Dozens of people have been killed in two attacks in Nigeria's northwest while suspected jihadists raided a military base in another nearby state, officials said on Monday, as the region struggles with a surge in violence.
Criminal gangs known locally as bandits have terrorised northwest and central Nigeria for years, but they have become more brazen in recent months and the military has renewed operations in a bid to end the attacks.
On Sunday, unidentified gunmen attacked Madamai village in Kaduna State, leaving 34 residents dead and seven others wounded," state security commissioner Samuel Aruwan said.
Troops came under fire before forcing the assailants to withdraw after an intense exchange, he said in a statement.
Also on Sunday, gunmen attacked a church in the Kachia district of Kaduna State, killing at least one person, he said.
Sunday's violence led to reprisals by unidentified assailants on communities in Kacecere in Kaduna, which left another eight dead, six injured and several houses razed, Aruwan said in a second statement without giving details on when that violence took place.
The bandits who raid villages, steal cattle, kidnap for ransom and burn homes, have no known ideology.
But analysts see signs of growing cooperation between the gangs and jihadists fighting a 12-year Islamist insurgency in the northeast.
The military began an anti-bandit campaign earlier this month in Zamfara State and other northern states have imposed restrictions on movement and trade as well as a telecoms blackout to try to control the gunmen.
Armed bandits have been fleeing their camps in Zamfara and spilling into neighbouring states, according to officials and residents.
Nigeria's military said suspected Islamic State-aligned fighters and criminals were behind an attack on a base in northwest Sokoto State that a resident and medical source had said killed 17 security personnel.
The Islamic State West Africa Province group is active in the northeast since 2016, a thousand miles away from the northwest.
Security forces said they had repelled the other major attack on Sunday morning which occurred at Burkusuma camp, in Sabon Birni, Sokoto state, close to the border with Niger.
"Troops... successfully repelled an attack by suspected Islamic State West African Province (ISWAP) terrorists and bandits on the Forward Operation Base (FOB) at Burkusuma," Director of Defence Information Benjamin Sawyer said in a statement Monday.
News of the attack was slow to emerge due to limited communications as authorities in Sokoto have imposed a partial restriction on mobile phone networks.
"The attackers came in large numbers using a telecom network provided from a neighbouring country," Sawyer added.
A resident of Sabon Birni, Attahiru Umeh, said the gunmen "killed 17 security personnel including five soldiers, nine policemen and three civil defence corps officers."
A medical source at a public hospital in the capital Sokoto said he was aware of 17 bodies of "uniformed personnel" brought to the morgue in Sabon Birni.
Police and military sources declined to say how many people were killed or injured in the attack.
"Many of the ISWAP fighters were eliminated while some scrambled away with various degrees of injuries," said Sawyerr.
The military said some of the fighters fled to Bassira, in neighbouring Niger, and that efforts were ongoing with Nigerien forces to stabilise the area.
A source in Niger told AFP that "a dozen Nigerian soldiers, between 12 and 14, sought refuge in Niger, in Bassira, after an attack on their base by bandits." The soldiers were sent back to Nigeria on Sunday, the source added.
Sabon Birni district has been repeatedly attacked by armed groups along with neighbouring Rabah and Isa districts.
In May last year, 60 people were killed when gangs raided multiple villages in the district, according to officials.
The gangs have been increasingly targeting schools this year, kidnapping students and schoolchildren to squeeze ransom from authorities and parents.