A statement Saturday says troops repelled the attack in the Jere local government area in Borno state, killing three Boko Haram extremists. The statement says a member of a civilian self-defense force also was killed as he tried to stop a suicide bomber from entering the mosque.
The military calls the attack a "desperate" attempt to disrupt Nigeria's election, which has been delayed until Feb. 23 because of logistical issues elsewhere.
The chairman of Nigeria's electoral commission says the last-minute, weeklong delay of the presidential election has nothing to do with insecurity or political influence.
Mahmood Yakubu tells election observers and others in the capital, Abuja, that the delay is due to "very trying circumstances" including bad weather affecting flights in recent days and serious fires at three commission offices.
He calls the fires an apparent "attempt to sabotage our preparations."
The election has been pushed back to Feb. 23. Yakubu says if the vote had gone on as planned, polling units would not have been able to open at the same time nationwide. "This is very important to public perceptions of elections as free, fair and credible," he says.
He says the commission regrets any inconvenience, as many Nigerians say they have to reorder their lives once again around the election. Some say they traveled to vote and cannot afford to wait another week.
Nigeria's president says he is "deeply disappointed" by the last-minute delay of Saturday's election until Feb. 23 and says he is going back to the capital to hear the electoral commission's explanation.
President Muhammadu Buhari's statement says the commission had "given assurances, day after day and almost hour after hour that they are in complete readiness for the elections. We and all our citizens believed them."
His statement also appeals to Nigerians for calm, urges the commission to protect already distributed voting materials and stresses that his administration does not interfere in the commission's work.
He calls this a "trying moment in our democratic journey."
The top challenger to Nigeria's president in the now-delayed election is urging Nigerians to be patient and says he is heading back to the capital to consult with other "stakeholders" on the way forward.
Atiku Abubakar spoke to reporters outside his home in northern Adamawa state.
When asked if he was "dampened" by the last-minute postponement by the electoral commission, he said "absolutely not."
Both his party and the ruling party have condemned the last-minute decision to delay the vote.
A civic group monitoring Nigeria's now-delayed election says the last-minute decision to postpone the vote a week until Feb. 23 "has created needless tension and confusion in the country."
The Situation Room statement expressed shock and disappointment after assurances by the electoral commission that "everything was ready." It said the delay casts a "cloud of doubt" on the body's credibility and competence.
It called on political parties to avoid incitement and misinformation and called on the electoral commission to explain how Nigeria will pay for the costly election delay.
The commission in its early-morning statement cited unspecified "challenges" and said it would give more details Saturday afternoon.
Nigerians have awakened to find the presidential election delayed a week from Saturday until Feb. 23 because of what the electoral commission has called unspecified "challenges." The country's top two political parties condemn the last-minute postponement.
Some bitter voters in the capital, Abuja, and elsewhere who traveled home to cast their ballots say they cannot afford to wait another seven days.
A spokesman for top opposition challenger Atiku Abubakar in Delta state said the electoral commission "has destroyed the soul of Nigeria with this act."
Abubakar is expected to speak to reporters later Saturday from his home in the north.
One ruling party campaign director said it is better to give the electoral commission time to conduct a credible vote.
The commission is to give more details in the afternoon.