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 the president - who faces elections in a week - admitted the response to the insurgents' initial advance in north-east Nigeria had been too slow.
The army has claimed recent victories over Boko Haram in a conflict that has killed thousands since 2012.
Backed by neighbouring countries Chad, Niger and Cameroon, Nigeria's military says it has recaptured 11 of the 14 districts which had been under militant control.
On Thursday, however, Boko Haram attacked the town of Ngala, killing 11 people, after the army said it had retaken it.
President Jonathan's government has been heavily criticised for its failure to end the insurgency.
The government has made similar claims in the past about defeating or driving back Boko Haram within a specific period - but these have not been borne out by events.
The Nigerian insurgents this month pledged their allegiance to Islamic State militants, who control large parts of Syria and Iraq.
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.
February's elections were postponed by six weeks after the armed forces said they needed more time to secure the country.
President Jonathan told the BBC he was confident of victory - despite many predicting the most fiercely contested polls since the end of military rule in 1999.
His main opponent, Muhammadu Buhari, has described the 16-year rule of Mr Jonathan's party as "a disaster for the country and its citizens".
President Jonathan on Boko Haram:
"I'm very hopeful that it will not take us more than a month to recover the old territories that hitherto have been in [Boko Haram's] hands."
"We never expected that [Boko Haram] will build up that kind of capacity. We under-rated 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."
On the 219 schoolgirls abducted from Chibok:
"We have not seen dead girls, that is the good news. I believe they are still alive, I believe we will get them."
On the election:
"I will surely win it… My party is still the strongest party."
On violence during his presidency:
"Whatever goes wrong, I accept. Whatever goes right, I take the glory."
"Whenever I hear that somebody dies in Nigeria... I feel pain, because they are all Nigerians."