Nigerian President Goodluck Jonathan has said he hopes that all territory seized by Islamist militant group Boko Haram will be retaken within a month."They are getting weaker and weaker by the day," he told the BBC.
But he admitted the security forces had been slow to respond to the insurgents' initial advance in north-east Nigeria.
Nigeria's army has recently claimed a series of victories over the militants. The violence has killed more than 15,500 people since 2012.
Abducted girls 'alive' In an exclusive interview with the BBC's Will Ross in the capital Abuja, President Jonathan said: "I'm very hopeful that it will not take us more than a month to recover the old territories that hitherto have been in their [Boko Haram's] hands."
Earlier this week, the Nigerian military said the militants no longer controlled any urban centres in Yobe and Adamawa - two out of the three worst-affected states in the north-east.
The military also pledged that Borno state, the birthplace of Boko Haram, would soon be freed.
However, President Jonathan admitted in the interview that the authorities "never expected that they [Boko Haram] would build up that kind of capacity".
He added: "We underestimated their external influence. Since after the civil war we've not fought any war, we don't manufacture weapons, so we had to look for help to re-equip our army and the air force."
Analysis: Will Ross, BBC News, Abuja President Jonathan may have faced huge criticism at home and abroad for his handling of the insecurity in the north-east but he seems unwilling to concede any mistakes have been made.
Mr Jonathan clearly inherited a military beset by corruption and one which for decades has demonstrated an extraordinary inability to build up a decent array of weaponry - hence the recent scramble for military hardware including helicopters and tanks as well as the involvement of troops from neighbouring countries.
His assessment of the Boko Haram crisis is perhaps a little closer to the mark than the euphoric PR statements that are sent out on behalf of Nigeria's military suggesting this is a won war.
Yes, some jihadists have been killed in battle, he told me, but many have fled - either over the borders or into Sambisa Forest and the Mandara Mountains, whilst some he says have melted back into towns.
They may no longer control much territory but the Boko Haram crisis grew too deep to disappear in a hurry.
Mr Jonathan said that newly acquired military equipment, as well as co-operation with neighbouring countries, had helped push the jihadists out of towns and villages.
He added that while many militants had poured across the country's borders, he thought some had retreated into a stronghold in north-eastern Nigeria known as the Sambisa Forest.
The president also said he believed the 219 schoolgirls abducted from Chibok by Boko Haram last year were still alive, adding that the authorities continued their search for them.
"I believe we'll get them," the president added.
The interview comes just days before Nigerians are due to vote in presidential elections.
Despite stiff competition from the opposition, Mr Jonathan said: "I'll surely win."