At least 17 people were killed and dozens more wounded, most of them teenagers, after an attack on a college in Russian-annexed Crimea on Wednesday, with conflicting versions referring to a lone shooter and a bomb.

Russia's Investigative Committee said the attack was carried out by 18-year-old student Vladislav Roslyakov, who was captured on security camera footage carrying a gun in the technical college in Kerch and whose body was later found with gunshot wounds.

The Investigative Committee, which probes major incidents, had initially classified the attack as an act of terror, but later said it was investigating a mass murder after "this young man shot dead people in the college and then committed suicide," adding that all victims died of gunshot wounds.

The attack had first been reported as an explosion, with Russia's National Anti-Terrorism Committee saying an "unidentified explosive device" had gone off.

Committee spokesman Andrei Przhezdomsky said bomb squads were working "at the blast site", adding that the body of Roslyakov was found in the college next to a pump-action gun.

The Investigative Committee said 17 were killed in the attack which took place at around 12 noon (0900 GMT) on the peninsula, which was annexed by Moscow from Ukraine in 2014.

However Crimean leader Sergei Aksyonov told Russian Rossiya-24 television that the death toll had risen to 18, with more than 40 injured.

"The supposed killer shot himself, it's a student in the fourth year who was studying at the college. His body was found in the library on the first floor," Aksyonov wrote on Facebook.

The Investigative Committee said most of the victims were teenagers. The college's website says it accepts students in the last three grades of school, from the age of 14.

Aksyonov announced three days of mourning from Thursday over the "terrible tragedy".

Russian President Vladimir Putin, who is currently in the Black Sea resort of Sochi, said in televised comments that a "tragic event" had happened and that "as a result of an explosion of an explosive device, people died and many are injured".

He was speaking during talks with Egyptian President Abdel Fattah al-Sisi and made the statement before the Investigative Committee said the crime was a mass shooting rather than a terrorist attack.

"It's already clear that it's a crime, the motive and possible versions for this tragedy are being carefully examined," Putin said.

"I want to express condolences to the relatives of the dead and express the hope that the injured recover as quickly as possible," the president said, calling for a minute's silence to mourn the victims.

Kerch is linked to the Russian mainland by a bridge opened by Putin in May.

Witnesses said that the attacker fired shots but also spoke of hearing an explosion.

A student at the college who asked not to give his name told AFP that "I was in a class when I heard shooting on the first floor."

"When we all ran out into the corridor, there were others running and shouting that some guy with a machine gun was randomly shooting everyone in turn."

"Then a strong explosion went off, but thank God, I was already outside and saw our guys being thrown out of the windows by the explosive wave," he said, adding that part of the building collapsed.

Another witness who gave his name as Sergei and who worked nearby said in a video on the Kerch.tv website that he heard "a bang and shots." Sergei, whose shirt was covered in blood, said victims "were taken away in public transport, in minibuses and buses, with two or three people in each ambulance."

"They are children and staff," the witness said. "I saw people without legs, without arms."