One moment, Hadiza was weeping and flinging her arms around her father for the first time since her abduction; the next - gunfire and tear gas filled the air and people ran for cover.
It was supposed to be a joyous reunion to end the five-day ordeal of 279 girls kidnapped last week from the Jangebe Government Girls Science Secondary School in a remote corner of northwest Nigeria.
Cheering children had lined the street as buses brought the girls, grinning and waving, back to their school from the Zamfara state capital Gusau, where they had been cared for since their release on Tuesday. "Thank you! Thank you!" yelled one.
Relatives crammed around the buses, and parents laughed with joy as they found their daughters, who shouted "Thank God!".
Less than 40 minutes later, pandemonium broke out.
As government officials in a hall were giving lengthy speeches in front of the girls, impatient parents burst in and grabbed their children to take them home.
The officials ran out and shortly afterwards, reporters heard gunshots outside the school gates.
They saw police firing tear gas at a group of protesters outside the school, and soldiers shooting into the air.
At least three people were hit by bullets, but it was not immediately clear by whom.
A Reuters journalist's video showed hundreds of people fleeing down a side street. Two girls grabbed hands, ducked - and then ran as the soldiers fired.
Elsewhere, people threw rocks at government officials' and reporters' cars hurriedly leaving town.
The chaos drives home the desperation of the situation in northwest Nigeria, where banditry has festered for years, rendering large swathes of the region lawless.
The trend of kidnapping children from boarding schools was started by the jihadist group Boko Haram, which abducted 270 schoolgirls from the northeast in 2014, around 100 of whom have never been found.
It has since been taken up by armed criminal gangs seeking a ransom; the Jangebe abduction was the third mass school kidnapping in northern Nigeria since December.
Military and police attempts to tackle the gangs have had little success, while many worry that state authorities such as Zamfara's are making the situation worse by letting kidnappers go unpunished, paying them off or, as in Zamfara, giving them amenities.
President Muhammadu Buhari on Tuesday called for the captors to be brought to justice.
His national security adviser, Babagana Monguno, said the president had ordered a massive military deployment to Zamfara, banned mining and imposed a no-fly zone in the state.
He said the central government "will not allow this country to drift into state failure", adding: "We are not going to be blackmailed."