Women and children rescued from Boko Haram in the Sambisa forest arrive at an internally displaced people's camp in Yola, Adamawa StateAfolabi Sotunde/Reuters

The Nigerian military is gaining ground in the fight against terror group Boko Haram in the north of the country, according to President Muhammadu Buhari.

The president made the comment during a joint press conference with Ghana's President John Dramani Mahama on an official visit to the country. He added that the Islamist insurgents had been confined to the Sambisa forest, in Borno state, the stronghold of the terror group.

"The first thing I did after I came into office was to reorganise the military and clear orders were given to them in terms of retraining, re-equipping and redeployment of troops," Buhari said, according to a statement by senior special assistant on media and publicity Garba Shehu.

"In the northeast, the military is gaining ground and Boko Haram has been limited to the Sambisa forest." He also said that internally displaced people, estimated to be 2.1 million, are slowly returning to their communities.

Who are Nigeria's Boko Haram terrorists?

Boko Haram (recently renamed Iswap) fights against Western influence in Nigeria and aims to impose its version of Sharia law in the country.

The group declared an Islamic caliphate in Gwoza, along the Cameroon border, in August 2014.

Boko Haram has raided several cities in the north of the country in a bid to take control of more territory.

Three states − Adamawa, Borno and Yobe − have been under a state of emergency since May 2013, due to Boko Haram's attacks.

Buhari's comment came after reports emerged that the country's military had uncovered a Boko Haram plot to attack several towns in central Nigeria. Earlier in September, intelligence officials warned dozens of people linked to the Islamist group had been arrested in Lagos, Nigeria's commercial hub, suggesting that the insurgence could spread beyond the country's north.

Speaking with IBTimes UK from Abuja, defence spokesperson Colonel Rabe Abubakar confirmed the reports. He added: "The military is collaborating with security agencies to guarantee the safety of citizens. We are working according to the information we get from the intelligence to protect Nigeria's society."