A group of nearly 300 girls who were kidnapped from a school in north-western Nigeria last week have been released, a local official says.
The girls were abducted by unidentified gunmen from their boarding school in Jangebe, Zamfara state, on Friday and taken to a forest, police said.
The state's governor said on Tuesday that the group had been freed and the girls were now safe.
Such kidnappings are carried out for ransom and are common in the north.
Dozens of the girls were seen gathered at a government building in Zamfara after they were taken there in a fleet of mini-buses.
"It gladdens my heart to announce the release of the abducted students... from captivity," Governor Bello Matawalle wrote on Twitter.
"This follows the scaling of several hurdles laid against our efforts," he added. "I enjoin all well-meaning Nigerians to rejoice with us as our daughters are now safe."
The authorities said 279 girls had been freed, adding that a figure given last week by police that 317 had been kidnapped was no longer accurate.
One official told Reuters news agency that the discrepancy was because of the fact that some girls had fled shortly after being abducted.
"Most of us got injured... and we could not carry on walking," one of the girls told the BBC.
"They said they [would] shoot anybody who did not continue to walk," she added. "We walked across a river and they hid us and let us sleep under shrubs in a forest."
The group's release was secured through negotiations between government officials and the abductors, authorities in Zamfara state told the BBC.
Mr Matawalle has denied paying for the girls to be released, but last week President Muhammadu Buhari admitted state governments had paid kidnappers "with money and vehicles" in the past and urged them to review the policy.
President Buhari said he felt "overwhelming joy" at the news of the girls' release. "[I am] pleased that their ordeal has come to a happy end without any incident," he said.