TUUSULA, Finland (CNN) -- Flags in Finland were flying at half-staff Thursday and government workers observed three minutes of silence a day after a teenager opened fire at his high school, killing eight people before fatally turning the gun on himself.
Police probing Finland's first known school shooting said Thursday that a picture was emerging of the gunman as a lonely, antisocial 18-year-old who acted alone and left a suicide note saying good-bye to his family, but that his motive was unclear.
Police said the victims -- all of whom were from the school -- were apparently picked at random. Six were students, one was the 61-year-old school headmistress and one was the 42-year-old school nurse.
Ten other people were wounded in the attack.
Jokela High School was closed for the rest of the week, but some of the 460 students gathered there overnight and into Thursday, crying and lighting candles for the victims.
Police identified the gunman as Pekka-Eric Auvinen, a senior at the high school in the southern Finnish town of Tuusula, about 30 miles north of Helsinki. Auvinen died at a Helsinki hospital late Wednesday of a self-inflicted gunshot wound to the head.
Police said all of his victims had multiple gunshot wounds, most to the upper body and head. Police said they found 69 shells and more than 320 unused bullets at the scene.
Chief Inspector Tero Haapala told Finnish news agency STT that Auvinen was determined to kill as many people as he could before turning the pistol on himself. Haapala said everything suggested Auvinen wanted the massacre to be as spectacular as possible, according to STT. Watch Auvinen fire weapons in video from his Web page »
At a news conference Thursday, police said Auvinen had sprayed a flammable liquid, possibly lamp oil, on the walls of the school and that he tried but failed to light it.
Students and police painted a picture of panic at the school during the attack, which started around 11:45 a.m. (4:45 a.m. ET). Students said that the principal ordered everyone to stay in their classrooms, but many thought it was just a drill.
Students said that, as word spread that a gunman was moving through the school, they were told to barricade themselves in classrooms, lie on the floor down and wait for help. For 40 minutes, many lay in fear as the gunman moved through all three floors of the school.
Police said that, when they arrived just before noon (5a.m. ET), they found students trying to scramble out of windows; officers broke down doors to help students escape.
Police said that, when they first made contact with Auvinen, they told him to drop his gun, but he responded with fire. Fearful of hitting others, police did not fire back, they said.
Police said they found Auvinen a little more than an hour later, just after 1p.m. (6a.m. ET).
A search of his house turned up books and the gunman's writings, which suggest he had "very strong opinions against society," police said.
Authorities were also investigating notes and videos Auvinen had posted on YouTube, the online video-sharing site. Most of the videos indicated a fascination with violence and some hinted at the massacre itself.
Hours before the shooting, a video titled "Jokela High School Massacre --11/7/2007" was posted on the YouTube site by someone who identified himself as Auvinen.
In rambling text posted on the site two weeks before the shooting, Auvinen called himself "a cynical existentialist, anti-human humanist, anti-social social-Darwinist, realistic idealist and god-like atheist."
"I am prepared to fight and die for my cause," he wrote. "I, as a natural selector, will eliminate all who I see unfit, disgraces of human race and failures of natural selection."
The Jokela High School clip was one of about 80 videos posted on the site by Auvinen. In the video, a picture of the school disintegrates to reveal an image of a man resembling Auvinen against a red background, pointing a gun at the screen.
The clip was accompanied by the track "Stray Bullet" by the rock band KMFDM, whose lyrics were also quoted by Eric Harris and Dylan Klebold, the students behind the Columbine High School massacre of 1999 in the United States.
The YouTube site also included video of the Columbine shootings and the 1993 Waco siege in the United States, the 1995 sarin gas attack in Tokyo and bombs falling on Baghdad during the 2003 invasion.
Other video clips included Nazi war criminals.
Police said they had not known about the videos before the shootings. YouTube took them down within hours of the shooting.
The gunman, who had no criminal record, obtained a license for the weapon on October 19, four months after his 18th birthday -- the legal age limit for owning a firearm in Finland.
He practiced sharp-shooting as a hobby at a shooting range in Finland, police said.
Finland enjoys a strong tradition of hunting and has a high proportion of gun ownership, with 2 million firearms owned in a nation of 5 million people.
Prime Minister Matti Vanhanen said the shooting had inflicted a "deep wound" on the nation's sense of security. President Tarja Halonen called the attack "shocking and tragic."
Sweden's King Carl Gustav XVI sent his condolences, as did European Commission President Jose Manuel Barroso. E-mail to a friend
CNN's Phil Black contributed to this story.
Copyright 2007 CNN. All rights reserved.This material may not be published, broadcast, rewritten, or redistributed. Associated Press contributed to this report.