The kidnapping in Kaduna state on March 7 was one of the biggest such attacks in years and prompted a national outcry over security.

More than 130 students abducted by gunmen from a school in Nigeria earlier this month have been released “unharmed” days before a ransom deadline, say officials.

Government spokesman Abdulaziz Abdulaziz told Al Jazeera on Sunday that it “took a lot of backchannel engagement” to release the students abducted on March 7 in Kuriga, a dusty town in Kaduna state – the first mass kidnapping in Nigeria since 2021.

“[All] of them were released and all of them were fine,” he said, giving the official number of freed students at 137 – much lower than the figure of 286 students and one staff member in most media reports. He claimed the media reports were wrong, but did not give further details.

Earlier on Sunday, Uba Sani, governor of the northwestern state of Kaduna, said in a statement that the hostages were freed after “security operations” coordinated by the country’s national security adviser.

“We … thank all Nigerians who prayed fervently for the safe return of the school children. This is indeed a day of joy,” the governor said.

“The Nigerian Army also deserves special commendation for showing that with courage, determination and commitment, criminal elements can be degraded and security restored in our communities,” Sani added in a statement.

According to Kemi Okenyodo, executive director at Partners West Africa-Nigeria, an NGO, the discrepancy between the number of children reported to have been kidnapped and the number reportedly released on Sunday suggested “there was not a proper audit of the community to know how many children were kidnapped”.

She told Al Jazeera that schools in small towns are not set up like they are in major cities, with a fluid number of children coming to classes depending on the time of the day.

“However, no matter the situation, there ought to have been a proper audit,” Okenyodo stressed.

Abductions of students from schools in Nigeria by rampaging armed groups with no ideological affiliation are common. On March 9, 15 students were kidnapped from a school in the village of Gidan Bakuso in Sokoto state while at least 87 people, including women, were taken captive in the Kajuru area of Kaduna on March 18.

In recent years, the abductions have been concentrated in the country’s northwestern and central regions, where dozens of armed groups often target villagers and travellers for ransom, forcing families and communities to sell land, cattle and grain to secure their loved ones’ release – or in some cases, to turn to crowdfunding on social media sites.

The Kaduna gunmen last week demanded a total of 1 billion naira ($680,000) for the release of the children and staff and vowed to kill the victims if the payments were not made within 20 days. But Nigerian President Bola Tinubu said he would “not pay a dime” after the practice was outlawed in 2022 in a bid to clamp down on the attackers. Ransom payers face a 15-year sentence.

Okenyodo said that some form of negotiation had likely taken place between the government and the gunmen.

She said that those responsible in this incident must be held accountable to end the widespread practice of kidnappings.

“It’s not enough to have the children back home for us,” Okenyodo said. “To see a total end to these atrocities, to these criminal activities, people need to be held responsible, the systems need to be held accountable.”

Abductions at Nigerian schools were first carried out by armed group Boko Haram, which seized 276 students from a girls’ school in Chibok in northeastern Borno state in 2014. Some of the girls have never been released, with most of them forcefully married to the fighters.

In another mass kidnapping in July 2021, gunmen took more than 150 students in a raid. The students were reunited months later with their families after they paid ransoms.

A total of some 1,400 children have been abducted since 2014.