Several passers-by were injured in an indiscriminate knife attack in the northern Swiss town of Zofingen, according to the local police.
Police said on social media on Wednesday evening that the perpetrator had been apprehended by special forces after hiding in a building for two hours.
The victims had been transported to the hospital with stab wounds, Xinhua news agency quoted police as saying.
A large-scale police operation continued in the evening. The authorities advised people to avoid areas near the local train station.
It was still unclear if there was more than one attacker, police said.