A gunman has killed 10 people at a college in the town of Kauhajoki in Finland before shooting himself and later dying in hospital.
Media reports named the gunman as Matti Juhani Saari, 22, a trainee chef at the vocational college.
The suspect posted a video of himself on the internet last week firing a gun.
As a result of this, police interviewed him on Monday but decided they did not have enough evidence to revoke his licence, the interior minister said.
The minister, Anne Holmlund, said an investigation would now try to determine whether mistakes were made.
Prime Minister Matti Vanhanen said this was a "tragic day" for Finland.
The attack echoed a shooting spree at a Finnish school last year which left nine dead, including the gunman, who had also posted an internet video.
The shootings in Kauhajoki, some 330km (205 miles) north of the capital, Helsinki, began just before 1100 local time (0800 GMT).
An estimated 150 students were thought to be in the college buildings at the time.
Tuusula, Finland, November 2007 - nine dead, including gunman
Virginia Tech, US, April 2007 - 33 dead, including gunman
Erfurt, Germany, April 2002 - 18 dead, including gunman
Columbine school, Denver, US, April 1999 - 15 dead including two gunmen
Dunblane, Scotland, March 1996 - 16 children, one teacher and gunman dead
The gunman, dressed in black and wearing a ski mask, was seen entering the building with a large bag. Shots were fired soon afterwards.
School caretaker Jukka Forsberg told AFP news agency that two girls had told him a man was shooting.
"I saw a guy leaving a big black bag in the corridor and going into classroom number three and closing the door," he said.
"I looked through the window and he immediately shot at me. Then I called the emergency number. Thank God I was not hit, he fired at me but I was running zigzag. I ran for my life."
Mr Forsberg added: "I heard constant shooting. He changed another case in the gun. He was very well prepared. He walked calmly."
Police ordered an evacuation and called for reinforcements as fires blazed in the building.
The gunman remained at large within the college grounds for some time.
Mr Vanhanen confirmed the gunman had shot himself.
Media reports said the gunman was treated for a bullet wound to the head at Tampere University Hospital but later died.
One victim also died in hospital, raising the initial toll from nine.
College headmaster Tapio Varmola told AFP: "Police have told me they suspect [the gunman] to be Matti Juhani Saari. He is a second year culinary arts student at our school."
Mr Vanhanen expressed condolences to the families of the victims and declared Wednesday a day of national mourning.
"We all as a society must be united so that events like these will not happen again," he said.
Ms Holmlund said police questioned the man about the YouTube video, which showed him shooting at a firing range.
On the video, the gunman says "you die next" before firing three times at the camera.
Ms Holmlund said: "Police were aware of this and spoke to him on Monday, September 22. However, the police officer on duty decided there was no need to terminate his gun licence."
The gunman was given a "temporary licence" for a .22-calibre firearm this year, Ms Holmlund said.
In November 2007, eight people and the gunman died in another school attack in Tuusula, Finland.
The gunman, Pekka-Eric Auvinen, posted a video on YouTube as a preview of his attack, pledging to "eliminate" those he saw as "unfit".
In the wake of that attack, Finland's government pledged to raise the minimum age for buying guns.
But the country has a long tradition of hunting and weapons-bearing, with about 1.6 million firearms in private hands.
|Liveleak on Facebook|