It also said that officials knew an attack was imminent but did not act. In the siege, Chechen rebels took more than 1,000 hostages, mostly children, according to the BBC.
It ended when Russian forces stormed the building, an operation with “serious flaws”, the court added.
Russia said the ruling was “utterly unacceptable” and that it would appeal.
Survivors have said that the troops used excessive force during the operation to retake the school.
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, saying it was unable to rule whether the force used by the security officers was justified.
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 said the government would appeal against the ruling, RIA Novosty news agency reported.
For those caught up in the siege of Beslan’s School Number One, this is the result they’d 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.
With this ruling, the mothers of Beslan hope they can now push again for justice, here at home.