MOSCOW -- A gunman opened fire at a university in the Russian city of Perm on Monday, killing at least six people and injuring about two dozen others, according to Russian authorities.
The shooter, who police said was a student at the college, entered a campus building at Perm State University where classes were taking place and started shooting with a shotgun.
Police said officers confronted the shooter and detained him after he was seriously injured in a gunfight. He was transported to a hospital for medical treatment and is now in critical condition, according to Russia's Investigative Committee, which handles serious crimes.
Initially police said eight people had been killed, but health authorities later revised that to six dead as of late afternoon Monday. Twenty-eight people had sought medical attention with injuries of various degrees of severity, Perm's health ministry said, 19 of them with gunshot wounds.
Shortly after the attack happened, videos posted on social media showed panicked students jumping out of windows to escape and barricading themselves inside classrooms.
Semyon Karyakin, a second year geology student, said he was in an elevator coming downstairs after a class when he heard gunshots.
"The doors opened, two girls ran in and behind them were shots," Karayakin told ABC News by phone.
He said the elevator had opened onto the hallway where the gunman had just entered the building and he believed the attacker had fired shots after the two women.
The students retreated up a floor, he said, but the gunman by then had also already made his way up the stairs.
"We were again lucky because the lift again managed to close and we managed to get out of there. In the other case I wouldn't be talking with you," he said.
The group hid in a classroom, trying to bring in other students, and barricaded themselves there until police arrived, he said.
The shooter was stopped by a traffic officer who happened to be at the campus, according to police.
Officer Konstantin Kalinin told Russian television he and his partner had run to the building after a witness told them there was a shooter. While his partner helped evacuate people, Kalinin said he went looking for the attacker.
"I ran into the building to the first floor, I saw how an armed young man was coming down the stairs,' Kalinin said in a video interview. "I shouted at him, 'Drop it,' to which the young man pointed the gun at me and let off shots. After which I used my weapon."
After the shooter fell to the ground, Kalinin said he ran over and kicked his weapons away.
"And then after that I started giving him first aid," he said.
Russian state media named the suspect as Timur Bekmansurov, an 18-year-old student studying law. An account with Bekmansurov's name on the Russian social media network VKontakte published a lengthy post shortly before the attack which describes fantasizing about carrying out a mass killing at a public place. In the post, the person wrote he has no religious or political motive and said he had dreamed of the killing "for years."
A post accompanying that one showed the suspected shooter in a helmet and with ammunition cartridges around his chest, giving the finger to the camera.
Russia's Investigative Committee said it has opened a murder investigation and is investigating the circumstances of the shooting. Bekmansurov bought the shotgun used in the attack in May and had acquired it legally, Russia's National Guard told the state news agency TASS.
Monday's mass shooting was one of the deadliest in recent Russian history. Unlike in the United States, school shootings are rare in Russia; though attacks by students have started to become more frequent in recent years. In 2018, an 18 year-old student shot and killed 20 people and wounded 70 others before taking his own life at Kerch Polytechnic College in Crimea.
That has stirred demand recently for authorities to strengthen safeguards around gun ownership. In May this year a 19-year-old killed nine people and injured 20 when he opened fire at a school in Kazan, also using a weapon he had acquired legally. That shooting prompted Russian President Putin then to order rules be tightened for owning a weapon.
The Kremlin's spokesperson Dmitry Peskov on Monday defended government efforts to strengthen the rules, saying work had been done to do so.
"But, unfortunately, you see, the tragedy has happened and now it has to be analyzed," he told reporters.