MOSCOW -- Russian officials said an 18-year-old student attacked his vocational school Wednesday in Crimea, going on a rampage that killed 17 students and left more than 40 people wounded before killing himself. One student said the shooting went on for at least 15 minutes.
Russia's Investigative Committee, the nation's top investigative agency, said the attacker was caught on security cameras entering Kerch Polytechnic College in the Black Sea city of Kerch and firing at students. It identified him as Vladislav Roslyakov.
Sergei Aksyonov, the regional leader in Crimea, said the fourth-year student at the school had acted alone and killed himself in the school's library after the attack.
The committee said all the victims died of gunshot wounds.
The statements came after hours of rapidly shifting explanations by Russian officials as to what exactly happened at the school. Officials at first reported a gas explosion, then said an explosive device had ripped through the college canteen during lunchtime in a suspected terrorist attack. Witnesses, however, reported that victims were being killed by a gunman or gunmen.
Reflecting the official confusion, Russian President Vladimir Putin said the victims were killed by an explosion just as the Investigative Committee was announcing they were fatally shot.
Russian news media showed a security camera image of the suspect wearing white T-shirt walking down the school's stairs with a shotgun.
Russian television said Roslyakov's mother, a nurse at a local hospital, was helping the wounded, unaware that her son was the suspected attacker. It quoted those who knew Roslyakov as saying he was not very sociable and often put gloomy posts on his social media page.
A somber-faced Putin deplored the attack as a "tragic event" and offered his condolences to the victims' families at a news conference in the southern city of Sochi, where he was having talks with Egyptian President Abdel-Fattah el-Sissi. Putin led those present in a moment of silence and some events on his official program were canceled.
After the attack, local officials declared a state of emergency on the Black Sea peninsula that Russia annexed from Ukraine. They also beefed up security at a new 19-kilometer (nearly 12-mile) bridge linking the peninsula with Russia, which opened earlier this year. Military units were deployed around the college to help emergency agencies.
Guns are tightly restricted in Russia. Civilians can own only hunting rifles and smoothbore shotguns and must undergo significant background checks. Roslyakov received a permission to own a shotgun and bought 150 cartridges just a few days ago, according to local officials.
It was not clear what the explosion at the school was, if the attacker detonated it, or how many many people it wounded.
The Investigative Committee said an explosive device rigged with shrapnel went off in the lunchroom and Sergei Melikov, a deputy chief of the Russian National Guard, said it was homemade. Russian explosives experts later inspected the school for other possible bombs.
Witnesses spoke of a gunman or gunmen and some mentioned a powerful explosion.
"I heard an explosion and saw glass shards and window frames falling down," student Roman Voitenko told Russian state television.
The Komsomolskaya Pravda newspaper quoted student Semyon Gavrilov as saying he fell asleep during a lecture and woke up to the sound of shooting. He said he looked out and saw a young man with a rifle shooting at people.
"I locked the door, hoping he wouldn't hear me," the paper quoted Gavrilov as saying.
He said police arrived about 10 minutes later to evacuate people and he saw dead bodies on the floor and charred walls.
Another student, Yuri Kerpek, told the state RIA Novosti news agency that the shooting went on for about 15 minutes.
Olga Grebennikova, director of the vocational school, told KerchNet TV that men armed with automatic rifles burst into the college and "killed everyone they saw."
Russia annexed Crimea from Ukraine in 2014, trigging Western sanctions. Russia has also supported separatists who are fighting the Ukrainian government in eastern Ukraine, a conflict that has killed at least 10,000 people since 2014.
Over the past few years, Russian security agencies have arrested several Ukrainians accused of plotting terror attacks in Crimea, but no attacks have occurred.