A man with a history of psychiatric problems fatally shot three people and wounded two others in a small town in the canton of Valais, the Swiss attorney general's office said Thursday.

For still unknown reasons, the killer came to the downtown area of Daillon and opened fire on pedestrians, killing three women ages 32, 54 and 79 and wounding two men ages 33 and 63.

Police arrived on the scene shortly after the gunfire began and managed to arrest the man, who had been placed in a psychiatric center in 2005 and had had several weapons confiscated from him at the time.

The shooter, however, had several other weapons with him when he was arrested on Thursday, and authorities are investigating whether he had any more.

Prosecutors said that although the motive for the killings is not yet known, the man was related to some of the victims.

The shooter was seriously injured by police during his arrest and is being treated at a hospital. EFE