Police said they had the situation "under control" after they surrounded Jokela High School in Tuusula, some 30 miles north of the capital, Helsinki.
The school's principal was among those killed, according to police.
An Internet video posted Tuesday on YouTube predicted a massacre at Jokela High School, reports Britain's Sky News.
The video shows a still photo of a school that looks like Jokela, which then shatters into many pieces to reveal a tinted red image of a man pointing a gun at the camera.
The video is titled "Jokela High School Massacre - 11/7/2007", and was posted by someone using the name Sturmgeist89, which means "storm spirit", according to Sky.
Associated Press Television News found a second video, originally posted by the same user, titled, "Shooting in Finland Jokela's high school".
The video shows a man resembling the individual in the "massacre" clip shooting target practice with a handgun. The video is shot in a wooded area and there is snow on the ground. After taking a number of shots at what appears to be apples, the shooter walks past the camera, smiles and waves.
The person who posted the videos was identified in their user profile as an 18-year-old man from Finland. Sky News reports that police have confirmed the man behind Wednesday's shooting was the same person who posted the videos on YouTube. CBS News could not independently verify that claim.
The postings were later removed.
Kim Kiuru, a teacher at the school, said the principal announced over the public address system just before noon that all students should remain in their classrooms.
"I stayed in the corridor to listen to more instructions having locked my classroom door," Kiuru told the YLE radio station.
"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 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.
More than 400 students, ages of 12 to 18, were enrolled at Jokela, said Heidi Hagman, assistant to the Tuusula municipality director.
Prime Minister Matti Vanhanen described the situation as "extremely tragic" and said the government would hold an emergency meeting.