The Nigerian army has driven Boko Haram militants from the last camp in their Sambisa forest stronghold, President Muhammadu Buhari has said to bbc.com.
“The terrorists are on the run and no longer have a place to hide,” Mr Buhari said in a statement.
The Islamists’ camp fell at 13:35 local time (12:35 GMT) on Friday, he added.
The army has been engaged for the last few weeks in a major offensive in the forest, a huge former colonial game reserve in north-eastern Borno state.
It has recaptured significant areas of territory previously controlled by Boko Haram.
The group still stages suicide bombings in the northeast and in neighbouring Niger and Cameroon.
It promotes a version of Islam that forbids Muslims from taking part in any political or social activity associated with Western society, and has been fighting to overthrow the government and establish an Islamic state.
Its leader has pledged allegiance to so-called Islamic State.