He then fled with a stolen car, which later was involved in an accident. Police closed roads and helicopters flew overhead as they tried to apprehend the assailant, according to reports.
The suspect continued on foot before attacking more people at a gas station shop, where he was arrested, police said.
Police think the arrested teenager acted alone and the statement said there was no indication he has ties to extremists.
Police didn't specify exactly how many people were hurt and said they were working to determine how serious the injuries were.
No information on a possible motive was provided.
The teenager reportedly escaped in a car after the attack.
More about: #Switzerland