At least 200 people have been killed during the bloody climax of a three-day hostage crisis at a school in southern Russia, health ministry officials say.
Many of the children were half-naked, because of the intense heat inside the crowded building
Hundreds of people were injured when explosions and shooting brought the siege to a violent end. Many of the casualties were children.
Russian President Vladimir Putin has arrived on a surprise visit to the site at Beslan, North Ossetia, reports say.
Officials said 27 hostage-takers were killed and three were arrested alive.
The BBC's Damian Grammaticas, at the scene, says three other hostage-takers are still on the run.
The armed group took over the school on Wednesday.
Russian officials have described some of the hostage-takers as mercenaries from Arab countries.
Heavy gunfire and explosions began on Friday morning, and it was many hours before special forces had control of the school.
1 - At 0850GMT a vehicle from the emergencies ministry is sent in to retrieve the bodies of those killed at the start of the siege.
2 - A series of blasts rock the gym, bringing the roof down.
3 - Hostages start running. The attackers fire at them to try to block their escape, prompting the troops outside to shoot back.
It appears the violence began as medical workers drove into the school complex in a pre-agreed trip to collect the bodies of casualties who died when the school was first seized.
A sudden explosion, which some reports suggest may have gone off accidentally, seems to have prompted hostage-takers to begin shooting indiscriminately.
Hostages panicked and tried to flee, while Russian forces stormed the school in an unplanned operation.
There were scenes of pandemonium, as terrified and half-naked children ran from the school amid intense gun battles.
More than 700 people were injured. The health ministry of North Ossetia told Interfax news agency that by the early hours of Saturday morning local time, 531 people remained in hospital - half of them children.
Ninety-two children are said to be in a critical condition.
More than 1,000 people are thought to have been in the school as parents joined their children for festivities on the first day of term.
Correspondents say the day's events have taken Moscow by surprise.
There has been no public comment so far from President Putin, though two Russian news agencies report he is visiting a local hospital where survivors are being treated.
Meanwhile, US President George W Bush described the events as "another grim reminder" of terrorism.
"We stand with the people of Russia, we send them our thoughts and prayers in this terrible situation," he said.
Correspondents say many of those released were desperate for water when they came out, and some were barely able to stand.
One boy described his escape.
"I smashed the window to get out," he told Russian TV. "People were running in all directions... [The rebels] shot from the roof."
Ambulances ferried hundreds of people to hospital.
Witnesses later saw at least 100 bodies piled inside the ruins of the school.
The attackers - both men and women, some wearing bomb belts - had demanded independence for the troubled region of Chechnya, where Russian forces have been involved in a bloody conflict with separatists for several years.