Watch: Several children killed in Russia school shooting
The shooting took place at Secondary School number 175 in the Russian city of Kazan.
An eyewitness told TASS news agency the attackers had carried out an explosion and then went on a “shooting spree”.
Two gunmen reportedly opened fire and a 19-year-old man was detained.
Local media have identified him as Ilnaz Galieyev, a former pupil at the school.
Tatarstan President Rustam Minnikhanov told reporters outside the school: “The terrorist has been arrested. He’s 19. He’s a registered firearm owner.”
The second attacker was killed on the fourth floor of the building.
Twelve children and four adults were being treated in hospital, President Minnikhanov said, calling the incident a “disaster” and a “tragedy”.
Authorities said security had been restored at the school after heavily armed police and emergency vehicles responded to the shooting.
Distressing video footage shared on social media showed some students jumping out of the windows to escape the shooting.
Dilyara Samigullina who was passing by the school building at the time of the incident, told the agency: "Several kids jumped out of the third-floor windows at some point, presumably in an effort to escape someone who was chasing them."
Other videos showed broken windows with debris outside and emergency service vehicles parked outside the school, with people running towards the building.
Police have opened an investigation. No motive has yet been established.
Kazan is the capital of Russia’s Tatarstan region, roughly 700 kilometres (430 miles) east of Moscow.
School shootings are relatively rare in Russia, but authorities have been on guard since a 2018 incident at a polytechnic college in Kerch, Crimea.
That shooting left 20 people dead, the greatest number lost to school violence since the 2004 Beslan terror attack, where 333 died.
Watch the latest videos from Yahoo News UK