The Nigerian military is close to completely defeating Islamist Boko Haram militants, President Muhammadu Buhari has told the BBC.

He said the militants could no longer mount conventional attacks against security forces or population centres.

"I think, technically, we have won the war," he said.

The president has given the army until the end of the month to defeat Boko Haram, whose six-year insurgency has devastated north-eastern Nigeria.

But the BBC's Bashir Sa'ad Abdullahi in the capital, Abuja, says that the deadline is likely to be extended as Boko Haram is still bombing areas despite losing towns under its control.

Nigeria Boko Haram: Militants 'close to defeat' - Buhari

The president says that key to the defeat of Boko Haram is reorganising, retraining and reequipping the army

Nigeria Boko Haram: Militants 'close to defeat' - Buhari

The Islamist insurgency has kept about one million children out of school in Nigeria and three neighbouring states, the UN children's agency said earlier this week

Nigeria Boko Haram: Militants 'close to defeat' - Buhari

Boko Haram has sworn allegiance to Islamic State and often displays its trademark black flag

Critics of the government argue that it has exaggerated the scale of its success against the militants, and that each time the army claims to have wiped out Boko Haram, the militants have quietly rebuilt.

The insurgency is said to have killed some 17,000 people and left more than two million homeless.

The jihadists have been forced to cut back on suicide bombings as a result of the military action against them, President Buhari said.

"Boko Haram has reverted to using improvised explosive devices (IEDs)," he said. "They have now been reduced to that."

"Boko Haram is an organised fighting force, I assure you, [but] we have dealt with them."

He said the militants had all but been driven out from Adamawa and Yobe states and remained a force only in its heartland of Borno state.

"They cannot now marshal forces and attack towns or attack military installations and so on as they did before.

"I don't think this is mad talking."

The president said that Nigeria had reorganised and reequipped the military. which had received training from the British, the Americans and the French.

"A lot is being done," he said.