The incident took place in a remote village called Dogo Dawa in Nigeria’s Kaduna state on Sunday.
“We are suspecting a reprisal attack by gangs of armed robbers who lost some of their members after a recent exchange of fire with the villagers and the vigilantes,” Abdullahi Muhammad, a local official, told Reuters.
“The village had been terrorized by an armed group operating from camps in the forest. These armed men mostly attack villages and motorists along the busy Kaduna to Lagos highway,” he added.
Although no group has yet claimed responsibility for the attack, authorities usually hold the Boko Haram militant group accountable for such attacks.
The extremist group has claimed responsibility for a number of deadly gun and bomb attacks in various parts of Nigeria since 2009.
In one of the recent similar incidents, at least 26 civilians, mostly students, were killed at a hostel at the Federal Polytechnic University in the northeastern town of Mubi.
The unknown gunmen entered the hostel and went from door to door calling their victims out by name before shooting or slitting their throats.
The group has attacked Muslim figures as well as a range of other targets, including the United Nations building in the capital Abuja during the previous months.
Human rights groups report that violent actions by Boko Haram since mid-2009 have claimed more than 1,000 lives, including over 300 this year alone.