Security forces on Thursday rescued nearly 350 schoolboys who had been kidnapped in northwestern Nigeria and taken into a vast forest, the governor of Katsina state said, bringing relief to many families.
It was not immediately clear whether all the missing boys had been recovered.
"I think we have recovered most of the boys," Governor Aminu Bello Masari said in a televised interview with state channel NTA.
Hours earlier a video started circulating online purportedly showing Islamist militants from Boko Haram with some of the boys. Reuters was unable to immediately verify the authenticity of the footage, the boys, or who released it.
The abduction gripped a country already incensed by widespread insecurity and evoked memories of Boko Haram's 2014 kidnapping of more than 270 schoolgirls in the northeastern town of Chibok.
Last Friday night, gunmen raided the Government Science Secondary School in Katsina on motorbikes and marched the boys into Rugu forest, in the biggest such incident in the lawless region in recent years.
Masari said a total of 344 boys held in the forest had been freed in neighbouring Zamfara state. He did not say how many had been missing or how they were freed.
He said security forces had cordoned off the area where the boys were being held and were given instructions not to shoot.
"We thank God that they took our advice and not a single shot was fired," he said.
The boys were on their way back to Katsina and would be medically examined and reunited with their families on Friday, Masari said.
Retired health worker Shuaibu Kankara, whose 13-year-old son Annas Shuaibu was among the kidnapped boys, could not contain his joy at their release.
"I am so happy," he said. "We are so grateful to the governor of Katsina and all those who worked hard to secure their release."
His only concern now was reuniting with his son, he said.
President Muhammadu Buhari welcomed the students' release and asked for patience while his administration dealt with security issues.
"We have a lot of work to do," he said in a statement but added, "We will deal with all that."
The abduction was awkward for Buhari, who comes from Katsina and has repeatedly said that Boko Haram has been "technically defeated".
Boko Haram had claimed responsibility for the kidnapping in an unverified audio recording.
The video, which featured Boko Haram's emblem, showed a group of boys in a wood pleading, "Help us, help us."
The father of one of the missing boys, who gave only his first name Umar, said his son, Shamsu Ibrahim, was one of the boys who is heard speaking in the video.
"All the armies that have come here to help us, please send them back. They can do nothing to help," the boy says.
Boko Haram has a history of turning captives into jihadist fighters. If its claims are true, its involvement in northwestern Nigeria marks a geographical expansion in its activities. But it could have purchased the boys from local criminal gangs with which it has been building ties.
Earlier on Thursday, protesters marched in the state capital, also called Katsina, under a banner reading #BringBackOurBoys as pressure mounted on the government to improve security.
"Northern Nigeria has been abandoned at the mercy of vicious insurgents, bandits, kidnappers, armed robbers, rapists and an assortment of hardened criminals," said Balarabe Ruffin of the Coalition of Northern Groups (CNG), which focuses on the welfare of northern Nigerians.
Armed gangs that rob and kidnap for ransom, widely referred to as "bandits", carry out attacks on communities across the northwest, making it hard for locals to farm, travel or tap rich mineral assets in some states such as gold.
Such gangs killed more than 1,100 people in the first half of 2020 alone, according to rights group Amnesty International.
In the northeast, Boko Haram and its offshoot, Islamic State West Africa Province, have waged a decade-long insurgency estimated to have displaced about 2 million people and killed more than 30,000. They want to create states based on their extreme interpretation of Islamic sharia law.
Buhari, a former military ruler, was elected in 2015 in large part due to his pledge to crush the insurgency. Under his predecessor, Goodluck Jonathan, Boko Haram grew in strength and controlled territory around the size of Belgium.