Russia's three-day hostage crisis ended on Friday with the killing of more than 150 captives, many of them children.
Heavy gunfire and loud explosions were heard as troops entered the school in the town of Beslan in north Ossetia, where Chechen separatists were holding an estimated 1,200 people hostage.
Over 20 militants, including 10 Arabs, were killed in the operation.
Hours after storming the building, the army remained engaged in a fierce gun battle to free the remaining hostages, 70 per cent of them students, President Vladimir Putin's aide for Chechnya, Aslam Aslakhnov, said.
Aslakhnov said that the militants killed over 150 hostages. Of them, 79 have been identified.
It was only after the security forces took out a booby trap and a tank fired at an outhouse where the last batch of militants was holed up, that the operation ended, NTV channel said.
Five militants were captured alive when they tried to flee in civilian clothes, Channel One TV said.
According to Inter-fax news agency, the toll could go up to 200.
The crisis began on Wednesday when some well-armed men and women took control of the school. They refused offers of food and water for the hostages and warned security personnel not to launch any offensive.
Negotiations began and everyone, including Putin, said force would not be used to end the standoff.
"I want to point out that no military action was planned," said regional Federal Security Service chief Valery Andreyev on Friday. "We were planning further talks."
The developments came as many captives escaped amid sporadic explosions and firing that lasted more than an hour.
Images broadcast from the scene were of utter chaos.
Half-naked children dashed out of the school. Some were carried and helped by parents and adults. Many were bleeding.
Children were also brought out in stretchers and put into cars and ambulances.
One unidentified woman freed on Thursday told Izvestia newspaper that during the night children began to cry.
"Then the fighters would fire in the air to restore quiet. In the morning they told us they would not give us anything more to drink because the authorities were not ready to negotiate.
"When children went to the toilet, some tried to drink from the tap. The fighters stopped them straightaway."
A female suicide bomber killed nine people outside a Moscow subway station on Tuesday.
Two suspected Chechen female suicide bombers downed two jetliners on August 24, killing all 89 people aboard the planes.
In October 2002, Chechen rebels had entered a Moscow theatre and held around 700 hostages.
That standoff ended when Russian forces leaked poison gas into the theatre.
More than 120 hostages and 41 attackers were killed, most of them from the gas.