A suicide bomber detonated an explosive device just after the mosque, said a prayer.
Othman Abubakar, a spokesman for the police, told reporters the dawn attack was perpetrated by an unidentified teenage boy who set off the suicide vest he wore to the mosque in Kunu Araha, a suburb town of Mubi in the northern state of Adamawa.
The terror group has killed more than 20,000 people and forced around 2 million people to flee their homes.
Florida zeroing in on Chip Kelly
Kent Fuchs and athletic director Scott Stricklin . "There will probably be some more productive conversations in the days ahead". Throw in being surrounded by some of the top recruiting strongholds in the country, and Florida seems poised for a quick fix.
Haruna Furo, head of the Adamawa state emergency management agency, and Musa Hamad Bello, chairman of the Mubi north local government area, both confirmed the attack.
"I was there when the rescue was on and 40 people died on the spot and several others were taken to hospital with severe and life-threatening injuries", he added.
"This is obviously the work of Boko Haram".
Give thanks, then ask questions at White House press briefing
I'm thankful to have never sat through a White House press briefing where I was expected to say what I was thankful for. One reporter even said they were thankful for being an Ohio State fan after another said they were a MI fan.
Mubi is in Adamawa state, where Boko Haram held territory until the Islamist militants were pushed back by troops in early 2015.
Most attacks by the group focus on Borno state, the birthplace of the insurgency.
"Seven Boko Haram on two motorbikes met them and slaughtered two, then killed the other four".
No fear of Real Madrid, APOEL's coach
It is the first crisis of Zidane's still fledgling coaching career, but the Frenchman dismissed the building pressure. "There are more hard jobs".
The attack early Tuesday was the first in the town since it was recaptured from Boko Haram three years ago.