Nigeria's army will take a bigger role in the effort to crush Boko Haram, by taking over from soldiers from Niger in occupying towns liberated from the Islamist militant group, President Muhammadu Buhari said on Wednesday.

Niger and Chad played a leading role earlier this year in driving the insurgents from towns in northeastern Nigeria including Malam Fatori and Damasak, in part because of the weakness of the Nigerian army.

"I renew my commitment to track Boko Haram into a corner, to destroy it. Five years of the presence of this evil sect is enough," Buhari told a news conference with Niger's President Mahamadou Issoufou.

He was speaking during a visit to Niger that is his first trip overseas since winning elections in March in Nigeria, which has the biggest population and economy in sub-Saharan Africa. Buhari said he would visit Chad on Thursday.

"On the issue of the Niger military positioned in cities of Nigeria. I think in the next four weeks we will be able to replace them with Nigerian forces so they can return to their country," he said.

A new multinational force of 8,700 troops from Nigeria, Niger, Chad, Cameroon and Benin to combat the insurgency in the Lake Chad region will become operational in the coming weeks, Issoufou said on Tuesday.

Buhari said the other nations would provide weapons and help restore infrastructure destroyed by the insurgents. He also thanked Niger for hosting as many as 150,000 refugees who fled insecurity in Nigeria to Niger.

"Niger is ready to finish with Boko Haram and protect its borders, its people and their property," Issoufou said.

Boko Haram launched its insurgency in 2009, attacking towns and villages and killing thousands of people in pursuit of a state adhering to strict sharia law. The militants' abduction of 200 schoolgirls in April 2014 provoked outrage across the world.

– Reuters