Gunmen on motorbikes raided a tomato factory in Kebbi State, western Nigeria, during which they killed six police officers and a civilian.
According to a police spokesperson, the attackers wanted to kidnap foreign nationals working at the factory but were unable to.
The region is grappling with armed motorbike gangs, known locally as bandits, who frequently steal animals, kidnap for ransom and kill those who confront them, the BBC reports.
Many states in northwestern Nigeria have groups of volunteers who help defend villages and towns against armed gangs.
This is due to the occupation of security forces to fight Islamist militants.