TUUSULA, Finland — The Finnish teenager who killed eight people in a high school shooting was a bullied social outcast but appears to have picked his victims randomly, a senior police official said Thursday.

Police spokesman Goran Wennqvist told reporters the gunman, identified as 18-year-old Pekka-Eric Auvinen, left a suicide note, "saying goodbye to his family and a message ... indicating his will against society."

Investigators believe Auvinen revealed plans for the attack in postings on YouTube in which he urges revolution, and grins after target practice.

One posting called for a popular uprising against "the enslaving, corrupted and totalitarian regimes" and appeared to anticipate a violent attack.

"I am prepared to fight and die for my cause. I, as a natural selector, will eliminate all who I see unfit, disgraces of human race and failures of natural selection," the posting said.

Police said Auvinen killed eight people before turning the gun on himself Wednesday at Jokela High School in Tuusula, some 30 miles north of the capital, Helsinki. Police initially said the victims were seven students and the principal, but Detective Superintendent Tero Haapala said Thursday that the school nurse was among those killed.

"You can say that the motive is still open," Haapala told The Associated Press. "But the explanation can be found mainly in his Web writings and his social behavior."

He said Auvinen appeared to have selected his victims at random.

"There's nothing that links him with the victims except that they attended the same school," Haapala said.

Auvinen shot the victims with a .22-caliber pistol, police said, adding that about a dozen other people were injured as they tried to escape from the school.

The gunman then shot himself in the head, and died hours later at a hospital.

Witnesses described a scene of mayhem in the leafy lakeside community, in which the assailant scoured the school for victims while shouting "Revolution!"

On Thursday, grieving students placed candles outside the school, which was still encircled by police tape as forensic experts sought to reconstruct the shooting spree.

Thursday was declared a day of mourning in Finland and memorial services were planned across the country. In Tuusula, a town of 34,000 people, a church was turned into a crisis center with experts on hand to comfort grieving residents. Flags were flying at half staff across the nation.

Gun ownership is fairly common in Finland by European standards, but deadly shootings are rare. Finnish media reported that a school shooting in 1989 involved a 14-year-old boy who killed two other students apparently for teasing him.

Police chief Matti Tohkanen said Auvinen belonged to a gun club and got a license for the pistol on Oct. 19. He did not have a previous criminal record and "was from an ordinary family," Tohkanen said.

Students said the shooter often wore the same clothes to school — brown leather jacket, black trousers and checkered shirt — and usually carried a briefcase.

Tuomas Hulkkonen, another student, said he knew the gunman well, adding that the teen had been acting strange lately.

"He withdrew into his shell. I had noticed a change in him just recently, and I thought that perhaps he was a bit depressed, or something, but I couldn't imagine that in reality he would do anything like this," Hulkkonen told Finnish TV broadcaster MTV3.

More than 400 students aged 12-18 were enrolled at the school, officials said.

Associated Press writer Jari Tanner in Helsinki, Finland, contributed to this report.