Nigeria has been rocked by four mass abductions of students in less than three months, sparking widespread anger against the government and memories of the 2014 kidnapping of hundreds of schoolgirls in Chibok, in the country's east, that shocked the world.
"I am happy to announce that the girls are free," Dr. Bello Matawalle, governor of Zamfara state, told an AFP journalist. "They have just arrived in the government house and are in good health."
An AFP reporter saw hundreds of girls wearing hijabs, gathered at the government premises.
Authorities initially said 317 girls were abducted in the raid by hundreds of gunmen on the Government Girls Secondary School in remote Jangebe village on Friday.
But Matawalle said the "total number of female students abducted" was 279.
"We thank Allah they are all now with us."
AFP footage showed minibuses pulling up in the night with students inside and lines of girls filing into a building.
Government officials had been in talks with the kidnappers, known locally as bandits.
A source said "repentant bandits" had been contacted to reach out to their former comrades as part of efforts to free the students.
- Armed gangs -Heavily armed criminal gangs in northwest and central Nigeria have stepped up attacks in recent years, kidnapping for ransom, raping and pillaging.
The Nigerian military deployed to the area in 2016 and a peace deal with bandits was signed in 2019 but attacks have continued.
In December, more than 300 boys were kidnapped from a school in Kankara, in President Muhammadu Buhari's home state of Katsina, while he was visiting the region.
The boys were later released but the incident triggered outrage and memories of the kidnappings of 276 schoolgirls by jihadists in Chibok.
Many of those girls are still missing.
The gangs are largely driven by financial motives and have no known ideological leanings.
But there are concerns they are being infiltrated by armed Islamists. The jihadists' decade-old conflict has killed more than 30,000 people and spread into neighbouring Niger, Chad and Cameroon.
Authorities have denied paying any ransom to secure the recent releases, although analysts say this is unlikely and security experts fear that this will lead to an increase in kidnappings in these regions plagued by extreme poverty.
President Buhari, who has been criticised for failing to deal with the unrest, had insisted that he would "not succumb to blackmail by bandits".
Kidnapping for ransom in Africa's most populous country is already a widespread national problem, with businessmen, officials and ordinary citizens snatched from the streets.
At least $11 million was paid to kidnappers between January 2016 and March 2020, according to SB Morgen, a Lagos-based geopolitical research consultancy.
The student abductions have increased the number of children who cannot attend school, especially girls.
The regions involved account for the greatest number of unschooled children in the world, the Brussels-based International Crisis Group says.