The European Court of Human Rights ruled Thursday that Russia failed to adequately minimize risks ahead of a 2004 attack by Islamic militants on a school, and that the actions of security forces contributed to the deaths of hostages.

The three-day siege and massacre that started on September 1, 2004, at School Number One in Beslan, a town in the republic of North Ossetia, left more than 330 hostages dead, including 186 children. It is one of the bloodiest terrorist acts ever in Russia.

A group of Russians filed lawsuits accusing the government of failing to protect the victims against a known threat, mounting a deficient rescue operation, and not effectively investigating the attack and response.

The ECHR sided with the plaintiffs, saying authorities had specific information about a planned attack but did not boost security at the school. The court said afterward investigators did not properly examine how victims died, and "failed to adequately examine the use of lethal force by the authorities."

Russian presidential spokesman Dmitry Peskov rejected the ruling, calling it unacceptable given that Russia had been the victim of terrorist attacks.

The attack began on the first day of the school year. About 30 mostly Chechen and Ingush Islamic militants seized the school and killed several adults before taking more than 1,100 people hostage, including nearly 800 children. During a 52-hour standoff, most of the hostages were held in the school's gym, where temperatures soared and no food or water was provided.

On the third day, some of the hostages were released and the bodies of some adults killed on the first day were collected. But a sudden series of powerful explosions was followed by a fire that engulfed the gym and caused its roof to collapse. In response, Russian security forces backed by tanks stormed the building and fought a battle against the hostage-takers, leading to the deaths of more than 330 hostages and 186 children. Hundreds of other people were wounded, and others were reported missing.

The group that carried out the attack was allegedly controlled by Chechen separatist leader Shamil Basayev, who was killed in 2006. Basayev worked with jihadist militants such as Ibn al-Khattab, a Saudi national with close connections to al-Qaida.