(CNN) -- Investigators suspect a criminal gang was behind the Sunday morning killings of nearly two dozen men in a marketplace in northern Nigeria, a government official said.
The killings took place near a mosque in the village of Dogon Dawa, in the northern state of Kaduna. The attackers left 23 dead and 17 wounded, said Musa Ilallah, a regional coordinator with Nigeria's National Emergency Management Agency.
"Today is a market day at the village, so many people were out shopping," Ilallah said.
The victims, all of them men, had just left morning prayers at a nearby mosque, he said.
The surrounding district is notorious for armed robberies, and Dogon Dawa is surrounded by a forest that criminals use as a hideout. Ilallah said he was sure the attack was aimed at villagers who participate in a community watch group, "because they expose the criminals and their hideouts to police."
"I'm sure the Nigerian government will further investigate and take action to ensure this mass killing does not happen again," he said.
The victims of Sunday's attack were farmers, village chief Suleiman Zuberu told CNN.
Kaduna has been the scene of deadly clashes between Nigerian Christians and Muslims, including a spate of attacks on churches in June that left 50 people dead. The Islamic militant group Boko Haram, which is fighting to replace Nigeria's government with a fundamentalist Islamic state, claimed responsibility for those killings.
CNN's Nana Karikari-Apau contributed to this report.