Authorities say the attack occurred early Sunday in Dogon Dawa village in Kaduna state.
A rescue official in the state who lives nearby told The Associated Press that as many as 50 gunmen surrounded the village and its farmlands. Some of those killed appeared to have been leaving the mosque after morning prayers.
No one immediately claimed responsibility. Kaduna is divided between Muslims and Christians and has seen significant Islamist violence in recent months, but local officials say they believe the attack was in retaliation by gangs of armed robbers who had lost some of their members to Boko Haram terrorists.
Armed robberies along Nigeria's roadways are common. Local disputes erupting into violence also are common, especially in the north where the central government's rule is at its weakest. VoA.