The Nigerian army said Tuesday that it had repelled Boko Haram from all but three local government districts in the northeast, claiming victory for its offensive against the Islamist insurgents less than two weeks before a presidential election.

At the start of this year, Boko Haram controlled around 20 local government areas, a territory the size of Belgium, in its bloody six-year-old campaign to carve out an Islamic state in religiously mixed Nigeria.

But a concerted push by Nigeria's military and neighbors Chad, Cameroon and Niger has regained considerable ground. Over the weekend, Nigerian government forces recaptured the city of Bama, the second biggest in Borno state.

"We have three local governments remaining — Abadam, Kalabaldi and Gwoza — and we are optimistic that with time we will liberate those,'' Lieutenant General Tobiah Minimah, the army chief of staff, told reporters.

President Goodluck Jonathan, who is running for re-election, has been criticized for not doing enough to tackle the insurgency. His challenger, Muhammadu Buhari, has been campaigning on his reputation for being tough on security matters when he was military ruler of Nigeria in the 1980s.

It is not clear how much impact the military advances will boost Jonathan's election chances in the tightly fought race.

The militants were progressively chased out of Adamawa and Yobe states since the start of the year and have been cornered into an ever-shrinking area of Borno, the heartland of their insurgency.

The elections were postponed in February until March 28, with the military citing Boko Haram as warranting the delay. The electoral commission plans to set up polling booths in camps for the more than 1 million Nigerians displaced by the fighting, but there are fears that potentially millions of people may be unable to vote in areas affected by the violence.

Asked whether the vote could be held in the recaptured areas, Minimah said that would be up to the electoral commission. "The areas have been liberated, but structures of governance ... will need to be reinstated so citizens can go back to their areas and [vote]. How soon? I don't know,'' he said.

Boko Haram's worsening atrocities against civilians hit international headlines in April last year, when the militants kidnapped more than 200 schoolgirls from the village of Chibok, triggering a search for them that has been fruitless. Minimah said there was no news on the location of the Chibok girls for now, but that military officials were optimistic they would be able to get more information on it soon.