At least 21 people, including one policeman and four militiamen, were killed by gunmen in two attacks in northwestern Nigeria, police said Friday.
A surge in criminal activity has affected the region, where clashes over land and resources between ethnic Fulani herders and local farmers erupted more than a decade ago.
Around 200 motorcycle-riding gunmen known as "bandits" by locals rode into Diskiru village, Katsina state, on Thursday, shooting at residents.
"Seventeen people were killed in the attack including a policeman and four vigilantes," Gambo Isah, local police spokesman said.
Communities have resorted to armed vigilantes or militias, who work alongside the army, as self-defence.
Police said the attack was in reprisal for the killing of three bandits in a shootout with vigilantes last week.
Another gang attacked Gidan Goga village in neighbouring Zamfara state on Thursday.
"Four people were killed by the bandits while three others were injured," Mohammed Shehu, local police spokesman, said.
Between September 4 and October 25 alone, the Nigerian army said it killed 38 armed bandits, arrested 93 "collaborators", foiled 47 attacks and 31 kidnap incidents.
Gunmen that raid local communities have camps in Rugu forest which straddles Zamfara, Katsina, Kaduna and Niger states.
More than 8,000 people have died in the region since 2011, and over 200,000 displaced, some into neighbouring Niger, according to the International Crisis Group.