"There were two explosions outside the mosque on the Damboa Road this morning but luckily no deaths were recorded apart from the two bombers," militia member Babagana Kolo told AFP.
Kolo and a local resident both said the bombers were disguised as worshippers wanting to attend the "Tahajjud" or night prayer at the mosque but were stopped by security.
Just return stolen assets, Nigeria's Buhari tells UK PM
"The civilian joint task force (vigilante) didn't let them enter because he wasn't comfortable with them -- and he was right," said the resident, who asked not to be identified.
"While they were arguing, one of them perhaps lost his patience and set off his explosives. Shortly afterwards, the second bomber also went off."
Both men said only the vigilante was injured. Prayers were abandoned at the mosque but continued elsewhere in the Borno state capital, said Kolo.
18 killed in Nigeria road crash
The incident underlines the continued threat from Boko Haram, despite assertions from Nigeria's military that the Islamists have been severely weakened and even "technically defeated".
Boko Haram has repeatedly used suicide bombers against civilian "soft" targets such as mosques in the past, as part of its seven-year campaign to create a hardline Islamic state.
At the weekend, the Nigerian Army claimed it had freed 5,000 "hostages" during operations in the north of Borno near Lake Chad, where the Islamists are believed to have taken refuge.
But independent verification was impossible, with the area inaccessible for security reasons.
Around 50 killed as Boko Haram hits NE Nigeria village
The civilians are likely to have been living in areas under Boko Haram control and unable to move because of the military operations against the militants.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ