Russia’s Investigative Committee said in a statement on Monday that 14 children and seven adults were also injured in the shooting in Izhevsk, west of the Ural Mountains in the Udmurtia region.
Governor Alexander Brechalov said: “There are victims among the children, there are wounded too.” The attacker later turned the gun on himself, Brechalov said.
Russia’s interior ministry confirmed the shooting on its Telegram feed.
The Investigative Committee identified the gunman as 34-year-old Artyom Kazantsev, a graduate of the same school.
The gunman wore a black t-shirt with “Nazi symbols”, the Committee added.
Russia’s National Guard said Kazantsev used two non-lethal handguns adapted to fire real bullets. The guns were not registered with the authorities. A criminal probe into the incident has been launched on charges of multiple murders and illegal possession of firearms.
Izhevsk is a city of about 640,000 people about 960 kilometres (596 miles) east of Moscow.
The school, which teaches children aged six to 17, was evacuated and the area around it has been cordoned off.
The attack comes at a critical time for Russia, which is waging a deadly war in Ukraine and has recently announced a partial mobilisation order to boost its forces.
Hours before the school shooting, a man opened fire and wounded a military recruitment officer at an enlistment centre in Siberia.
Russian President Vladimir Putin on Monday denounced the Izhevsk attack as “inhuman”.
“President Putin deeply mourns the deaths of people, children, at a school where there was a terrorist attack by a person, who apparently belongs to a neo-fascist group,” Kremlin spokesman Dmitry Peskov told reporters.
“The president wishes for the recovery of those injured as a result of this inhuman terrorist attack,” Peskov added.
School shootings are relatively rare in Russia.
The last such tragedy took place in April 2022, when a man killed two children and a teacher at a kindergarten in the central Ulyanovsk region before killing himself.
In May 2021, nine people – including seven children – were killed after a lone teenage gunman opened fire in Russia’s southwestern city of Kazan.
In 2018, a student at a college in Russian-annexed Crimea killed 20 people before turning his gun on himself.
Other high-profile shooting cases have taken place in Russia’s army, putting the issue of hazing in the spotlight in the country where military service is compulsory for men aged between 18 and 27.
In November 2020, a 20-year-old soldier killed three fellow servicemen at a military base near the city of Voronezh. In a similar attack in 2019, a young recruit shot dead eight servicemen, saying he faced bullying and harassment in the army.