An 18-year-old gunman has killed two people and wounded seven others in what appears to be a random shooting in a southern Finnish town, police said Saturday.

Officers arrested the suspect near Hyvinkaa, some five hours after he fired several shots from a low rooftop at people gathered outside a restaurant just before 2am, said Detective Chief Inspector Markku Tuominen.

The suspect, a local man from Hyvinkaa, 50 kilometres north of the capital, Helsinki, did not resist arrest, Tuominen said.

"The man was found with two weapons ... including a hunting rifle," Tuominen said, adding that police knew of no possible motive pending an investigation.

The gunman killed an 18-year-old woman and an 18-year-old man, as well as critically wounded a 23-year-old female police officer who arrived at the scene soon after Hyvinkaa police received an alert.

Shootings are not uncommon in Finland where there are 650,000 officially recognised gun owners in a population of 5.4 million people, with strong hunting traditions.

In recent years, Finland also 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, southern Finland.

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.

Two months ago, a 23-year-old gunman wounded the father of his former girlfriend in an office building before firing several shots through a classroom door in southern Finland. No one was hurt at the junior high school, and the attacker quickly surrendered.