A 23-year-old gunman wounded the father of his former girlfriend in an office building in Finland on Friday, then went to a nearby school and fired several shots through a classroom door, police said.
No one was hurt at the junior high school, and the attacker quickly surrendered. Police did not identify the gunman but said he had no criminal record. The suspect could be charged with attempted murder and endangering the public.
Detective Chief Inspector Jari Kinnunen said the man had gone to the school in search of the former girlfriend after he had shot and slightly injured her 50-year-old father in an office in the town of Orivesi, 190 kilometers (120 miles) north of Helsinki.
Kinnunen said the gunman had been dating the girl but that the relationship had ended. "They had started going out together ... but he was not satisfied with the situation," Kinnunen said, without giving further details.
The gunman fired six shots with a hunting rifle through the closed door of a classroom occupied by a teacher and several students, but no one was hit, Kinnunen said.
"All the staff and students are safe," he told the AP. "He surrendered later without resisting arrest."
The attacker had licenses for three hunting firearms.
In Finland, a country of 5.4 million people with strong hunting traditions, there are 650,000 officially recognized gun owners.
In the last two years, the nation has seen two deadly school shootings.
In 2008, a culinary student killed nine fellow students and a teacher before shooting himself at a vocational school in the western town of Kauhajoki.
A year earlier, an 18-year-old killed six fellow students, a nurse and the principal at a high school in Tuusula, about 50 kilometers (30 miles) north of Helsinki, before shooting himself.
After those deadly attacks, authorities took steps to improve safety at schools, including installing surveillance cameras and locks on classroom doors and training staff to deal with shootings.
"There is still a lot of room for improvement," Interior Minister Paivi Rasanen said Friday. "We really have to carefully evaluate the incident (in Orivesi), but the initial information I have is that staff had acted in the correct manner."