MOSCOW -- A Russian official said a student attacked a vocational college Wednesday in Crimea, a rampage that killed 19 other students and left more than 50 people wounded, before killing himself. The comments by Sergei Aksyonov, the regional leader in Crimea, were the latest in a series of shifting explanations by Russian officials as to what exactly happened at Kerch Polytechnic College in the Black Sea city of Kerch.

Russian officials at first reported a gas explosion, then said an explosive device ripped through the college canteen about lunchtime in a suspected terrorist attack. But witnesses, however, reported that at least some of the victims were killed in an attack by a gunman or gunmen.

Aksyonov said on television that the student, a local man acting alone, killed himself after the attack.

Get Breaking News Delivered to Your Inbox

The Investigative Committee identified the attacker as Vladislav Roslyakov, 18. It said he was caught on security cameras entering the college with a rifle and firing at students. The committee said all the victims have died of gunshot wounds, contrasting with previous statements by other officials saying they had wounds resulting from an explosion.

On Wednesday night, Sergei Astrankin, the director of emergency medicine for Crimea, was cited by Russian state television as saying the death toll from the attack had risen to 19. The shooter apparently was not included in that number.

After the attack, local officials declared a state of emergency on the Black Sea peninsula that they had annexed from Ukraine in 2014. They also beefed up security at a new 12-mile bridge that links the peninsula with Russia that opened earlier this year -- with an inaugural crossing by Russian President Vladimir Putin himself.

Military units were deployed around the college.

Earlier, Russia's Investigative Committee, the nation's top investigative agency, said an explosive device that went off at the college's canteen was rigged with shrapnel. It was not immediately clear if the alleged attacker had detonated the explosive device.

Sergei Melikov, a deputy chief of the Russian National Guard, said the explosive device was homemade. Explosives experts were inspecting the college building for other possible bombs, according to Anti-Terrorism Committee spokesman Andrei Przhezdomsky.

Earlier in the day, Putin's spokesman, Dmitry Peskov, told reporters that officials are looking into a possible terrorist attack. He did not elaborate. Peskov said Putin has instructed investigators and intelligence agencies to conduct a thorough probe and offered condolences to the families of the victims.

Witnesses did not speak of an explosion but said one or more armed men attacked the school.

The Komsomolskaya Pravda newspaper quoted student Semyon Gavrilov, who said 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 from the college and he saw dead bodies on the floor and charred walls, presumably from some fire or explosion.

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 college, told KerchNet TV that men armed with automatic rifles burst into the college and "killed everyone they saw." Grebennikova, who said she had left the grounds shortly before the attack occurred, said students and staff were among victims.

Russia's Health Minister Veronika Skvortsova headed to the area to help coordinate assistance to the wounded and helicopters carrying emergency medical teams flew to the area.

Russia's annexation of Crimea from Ukraine triggered Western sanctions, and the U.S. is still supporting its ally Ukraine in a war against Russian-backed militants in the east of the country. Ukrainian rebels, backed by Russia, have seized swathes of territory in eastern Ukraine since 2014. The conflict has killed 10,000 people by some counts.

Over the past few years, Russian security agencies have arrested several Ukrainians accused of plotting terror attacks in Crimea, but no attacks have occurred.