Dozens of people were killed when an armed gang opened fire on locals in northern Nigeria, police and residents said Friday, in the latest violence to hit West Africa’s largest economy.

The carnage happened in Birani village, in the Zurmi area of Zamfara state, where previous bloody clashes have been blamed on cattle rustlers and kidnapping gangs.

Rural communities in the region have long been plagued by cattle thieves who kill villagers, loot and torch homes, prompting locals to form vigilante groups to defend themselves.

Police said 18 people died in the violence but according to locals more than twice as many lost their lives.

“We buried 41 people yesterday (Thursday) as a result of the attack from bandits who came on motorcycles, opening fire on anyone they could see,” said villager Lawwali Bube.

“They started by attacking a truck conveying bridesmaids and some traders. They stopped them, took out the driver and slit his throat. They then opened fire on the truck, killing everybody.

“They then set it on fire. They moved into the village by the market and opened fire.”

Another local resident, Hussaini Abdu, gave the same death toll and account. “We are in mourning because yesterday we collected 41 bodies and gave them a mass burial,” he said.

Zamfara police spokesman Mohammed Shehu said hunters from Birani came across a man with suspected stolen livestock in the bush on Tuesday.

“The herder abandoned the animals and escaped into the bush. Unknown to the hunters, the cattle rustler… mobilised bandits to attack the hunters,” he said in a statement.

“On (Wednesday), the bandits ambushed the hunters in the bush and there was a clash that led to fatalities on both sides.”

Police and other security agencies “discovered 18 dead bodies”, Shehu added.

Nigerian President Muhammadu Buhari condemned the “heinous and inhuman attacks” in a statement.

The president directed security agencies to “immediately mobilise” and “ensure that the perpetrators are brought to face the full wrath of the law.”

Buhari has had to deploy security forces throughout Nigeria to quell violence in the absence of a strong police force and rigorous legal system.

Without many prosecutions, victims become assailants in search of revenge, triggering a destructive cycle of reprisal attacks.

Abdu said the community had been “under siege” from the gangs, who live in surrounding forests.

“They come, attack our villages, steal our cows, abduct our women and do all sorts of heinous things to us,” he added, saying that had led to tit-for-tat attacks.

An increase in criminality has been blamed on a government crackdown on cattle rustling, forcing those responsible into kidnapping for ransom.

Security personnel believe the gangs are moving between connecting forest in the northern and northwestern states of Kaduna, Katsina, Kano, Sokoto, Kebbi, Zamfara and Niger.

The attacks are a persistent problem for Nigeria, adding to security woes in a country already grappling with the Boko Haram Islamist insurgency.