Boko Haram insurgents attack northeast Nigeria's capital city
The electoral commission is struggling with logistics to enable more than a million internally displaced people to vote.
Capturing Maiduguri, the northeast's main city and the place where the insurgency sprang from five years ago, would be a huge victory for Boko Haram, which controls mostly rural areas along the Cameroon and Chad borders that make up a territory the size of Belgium.
"The terrorists' attack on Maiduguri in the early hours of Sunday was quickly contained," Defence Spokesman Major-General Chris Olukolade said in an emailed statement.
"The terrorists incurred massive casualties. The situation is calm as mopping up operations ... are ongoing."
Last weekend, the military repelled multiple attacks by militants in Maiduguri in which more than 100 people were killed.
Boko Haram has become the main security threat to the stability of Nigeria, Africa's biggest economy and top oil producer, and increasingly threatens its neighbours. The group has killed thousands of people, many of them civilians, and kidnapped hundreds while the government has struggled to forge an effective response.
Last month, its fighters took control of Baga, on the shores of Lake Chad, the headquarters of multinational force comprising troops from Niger, Cameroon and Chad.
Chadian forces killed 120 Boko Haram militants in a battle in the north of Cameroon, the army said in a statement on Saturday. Three of its soldiers were killed.
Gunfire exchanges between the Chadian army and Boko Haram militants resumed again on Sunday afternoon near the Cameroonian locality of Fotokol, a Cameroon army officer said.