The suspect was later arrested, police said.
Heavily armed police cordoned off the school, which has some 800 students, in the city of Vantaa, just outside the capital, Helsinki, after receiving a call about a shooting incident at 9:08 a.m.
Police said the suspect was arrested in the Helsinki area later Tuesday.
“The immediate danger is over,” the Viertola school’s principal, Sari Laasila, told Reuters.
“The day started in a horrifying way. There has been a shooting incident at the Viertola school in Vantaa. I can only imagine the pain and worry that many families are experiencing at the moment. The suspected perpetrator has been caught,” Interior Minister Mari Rantanen said on X.
The motive for the shooting wasn’t initially clear.
The victims were taken to hospital, Reuters reported, citing a police spokesperson.
Reuters said the school has students from first through ninth grade, according to the local municipality.