7 students and the principal were kiled by an 18-year-old student who opened fire in a high school in southern Finland on Wednesday.
The man, who was not identified, shot himself in the head, but survived and was taken to a hospital in "extremely critical condition," police spokesman Tero Haapala said.
The shooting at Jokela High School in Tuusula, some 50 kilometers (30 miles) north of the capital, Helsinki, shocked the Nordic nation in which gun violence is rare.
Police said at a news conference after the attack that the gunman shot the victims - five boys, two girls and the female principal - with a .22-caliber pistol. About a dozen other people were injured in the incident as they tried to escape the school, police said.
"He was from an ordinary family," police chief Matti Tohkanen said about the gunman, who belonged to a gun club and got a license for the pistol Oct. 19. He did not have a previous criminal record, he said.
Finnish media said the shooter revealed his plans in YouTube postings before the attack.
One video, titled "Jokela High School Massacre," showed a picture of a what appeared to be the Jokela school and two photos of a young man holding a handgun. The person who posted the video was identified in the user profile as an 18-year-old man from Finland. The posting was later removed.
The profile contained a text calling for a "revolution against the system."
Another YouTube video clip showed a young man clad in a dark jacket loading a clip into a handgun and firing several shots at an apple placed on the ground in a forested area. He smiled and waved to the camera at the end of the clip.
A third clip showed photos of what appeared to be same man posing with a gun and wearing a T-shirt with the text "Humanity is overrated."
Police did not confirm that it was the gunman that was seen in the clips, but said they would investigate any possible connection he might have had to the postings.
Tuomas Hulkkonen, a student at the school, said he knew the gunman well, and that he had been acting strange of late.
"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 station MTV3.
Kim Kiuru, a teacher at the school, said the principal announced over the public address system just before noon (1000GMT) that all students should remain in their classrooms.
"After that I saw the gunman running with what appeared to be a small caliber handgun in his hand through the doors toward me after which I escaped to the corridor downstairs and ran in the opposite direction," Kiuru told reporters.
Kiuru said he saw a woman's body as he fled the building.
"Then my pupils shouted at me out of the windows to ask what they should do and I told them to jump out of the windows ... and all my pupils were saved," Kiuru said.
Terhi Vayrynen, 17, a student at the school told The Associated Press that her brother Henri Vayrynen, 13, and his classmates had witnessed the shooting of the principal outside the school through the classroom window.
She said the gunman then came into Henri Vayrynen's class shouting: "Revolution. Smash everything."
When no one did anything, he shot the TV and the windows of the class room but did not fire at the students. Then he ran out and down the corridor, Terhi Vayrynen said.
More than 400 students aged 12 through 18 were enrolled at Jokela, officials said.
Gun ownership is fairly common in Finland by European standards, but deadly shootings are rare. Finnish media reported that in 1989 a 14-year-old boy shot and killed two students, apparently for teasing him.
Prime Minister Matti Vanhanen described the situation as "extremely tragic," and declared Thursday a day of national mourning with flags to be flown half-staff.
The face of USA's First Lady Melania Trump after her handshake with Russian President Putin has received a lot of attention in social media
Moscow is trying to stop Balkan countries from entering NATO. Greece eventually took measures against Russia, even though Greek Prime Minister Alexis Tsipras had earlier said that Russia was Greece's strategic partner
The Ukrainian government refuses to abode by its obligations, rejects a peaceful resolution of the conflict, and disregards its own people, the president said