The European Court of Human Rights has ruled that Russia failed to protect the hostages of the Beslan school siege in which about 330 people died in 2004.
In the siege, Chechen rebels took more than 1,000 hostages, mostly children. The operation by Russian forces to end it used disproportionate force, the court added.
It also said that officials knew an attack was imminent but did not act.
Russia said the ruling was "utterly unacceptable" and that it would appeal.
No Russian official has been held responsible for the high number of deaths, which included 186 children.
What happened in Beslan?
Masked men and women, wearing bomb belts, burst into Beslan's School Number One, opening fire in the courtyard as a ceremony marking the beginning of the school year was finishing.
The hostages were crammed into their school sports hall beneath explosives strung from the basketball hoops. Their captors were demanding Russian troops pull out of Chechnya.
The tense siege ended suddenly on the third day with two deadly explosions and intense gunfire. Witnesses described the operation by Russian security forces as chaotic, saying that the troops used excessive force and heavy weapons.
Only one of the hostage takers was caught alive and put on trial.
What do survivors and relatives say?
For more than a decade, survivors and relatives have been asking whether the siege could have been prevented and whether so many people had to die in the rescue operation.
They say officials, including President Vladimir Putin, mishandled the hostage crisis and ignored intelligence indicating that a hostage-taking scenario was being planned. A Russian investigation into the events stalled several years ago.
So more than 400 of them applied to the European Court of Human Rights, a Strasbourg-based court run by the Council of Europe, a pan-European human rights body of which Russia is a member.
The council is a distinct entity and is not a branch of the European Union.
What has the court ruled?
In its ruling, the court said Russia had sufficient specific information that an attack was being planned in that area, but did not act.
It criticised the authorities for being unable to prevent the militants from meeting and travelling on the day of the attack, and failing to increase security at the school or warn the public of the threat.
It also said that "powerful weapons such as tank cannon, grenade launchers and flame-throwers" had been used to free the school, contributing to the high number of casualties.
The court was also critical of Russia's investigation into the case, saying it was unable to rule whether the force used by the security officers was justified.
"Though the decision to resort to the use of lethal force had been justified in the circumstances, such a massive use of explosive and indiscriminate weapons could not be regarded as absolutely necessary," it said.
It ruled that Russia should pay 2,9m euros ($3,1m; £2,5m) in compensation.
Countries must comply with the court's verdicts, although the court cannot directly enforce this.
How has Russia reacted?
The Russian government said the ruling was "utterly unacceptable".
"We certainly cannot agree with such an assessment, in a country which has suffered from more than one terrorist attack," spokesman Dmitry Peskov said.
The justice ministry denied that excessive force had been used and said the government would appeal against the ruling within the three-month deadline.
The court, the ministry added, did not understand "the full seriousness of the situation in Beslan after the seizing of the hostages" and the "risks of the process of carrying out a rescue operation".
Hope for justice: By Sarah Rainsford, BBC News, Moscow
For those caught up in the siege of Beslan's School Number One, this is the result they had hoped for. What happened in Beslan was first and foremost a horrific terrorist attack.
But many mothers of those killed have long argued that officials should have done more to save their children. For years, they have been pushing for those who failed them to be held responsible. Until now, no-one in Russia had been held to account.
The court has underlined that there should now be a new, objective investigation here in Russia - and the mothers of Beslan say they will now push for that too.
They argue they owe it to their children to make sure those responsible for the loss of life are held to account.