DAKAR, Senegal — Gunmen stormed a north-central Nigerian boarding school early Wednesday, kidnapping at least 20 teenage boys, the local governor said — the second mass abduction of children to shake the country in three months.

The attackers raided the Government Science Secondary School in the town of Kagara before sunrise and dragged the classmates into the dense woods.

Police initially said they suspected “hundreds” could have been taken. Three teachers and 12 family members also vanished into the night, Abubakar Sani Bello, the governor of Niger state, said on television.

Schools in the region have been shuttered. Helicopters hovered over the treetops as security forces continued their search and, by midmorning, authorities were still counting the missing.

No one has asserted responsibility for the ambush, but the region is regularly afflicted by criminal gangs — authorities call them “bandits” — that take hostages for ransom.

That threat recently collided with Boko Haram, the extremist group that gained global notoriety after abducting hundreds of schoolgirls in 2014.

Those radical fighters normally operate hundreds of miles away in the nation’s northeast. Then the group’s leader, Abubakar Shekau, shocked Nigerians when he claimed responsibility for kidnapping 300 boys from a northwestern school in December. Security forces freed the boys days later.

Boko Haram staged the attack in its quest to eradicate “Western education,” Shekau said in an audio message.

The group has killed at least 36,000 people and forced millions from their homes over the past decade, striking most often near its stronghold in the Lake Chad Basin.

But it has cells throughout Nigeria’s rural north, which are known to have forged relationships with criminal gangs, analysts say.

“The line between Boko Haram and the bandits is getting more and more blurred,” said Bulama Bukarti, a sub-Saharan Africa researcher from northeastern Nigeria at the Tony Blair Institute for Global Change in London. “More broadly, this is another demonstration of the deteriorating insecurity in Nigeria.”

The gunmen who struck the school Wednesday in Kagara could have been copycats seeking big ransom payouts, he said. Or the mass abduction could be another sign of extremist organizations expanding their reach across Africa’s most populous nation.

West Africa faces the fastest-growing Islamist insurgencies in the world. Unrest by disparate forces is rocking Nigeria and three of its neighbors: Mali, Burkina Faso and Niger.

Boko Haram spawned an offshoot in recent years, the Islamic State in West Africa, which more typically strikes military targets.

Bandits, meanwhile, continue to rattle life with their own high-profile kidnappings.

Assailants grabbed more than 20 people off a bus last week in the same state, Niger, and have demanded ransom payments of more than $1.3 million, according to local media reports.

They released a video Wednesday showing the victims — including several children — crying and pleading for their freedom.

The captors, faces obscured by bandannas, stand next to them with machine guns.

Ibrahim Garba in Kano, Nigeria, contributed to this report.