The attack happened on Wednesday at around 21:00 in the village of Daillon in Valais canton, 100 km (60 miles) east of Geneva.
Police shot and wounded the suspect after he threatened to turn a gun on them. He has been arrested.
Investigations revealed the man was a known drug addict and former mental health patient, authorities say.
The unnamed suspect, whom witnesses identified to local media as a 30-year-old Daillon resident, fired around 20 shots at his victims, general prosecutor Catherine Sappey said at a news conference on Thursday.
At least two weapons were used in the attack, including a hunting gun and a historical army rifle known as a carbine, which dates back to the first half of the 20th Century.
Police had previously confiscated weapons from the suspect in 2005 when he was placed in a psychiatric ward, Catherine Sappey told journalists.
Back then, “he was not known for having issued threats,” she added.
The assailant is thought to have been related to some of his victims, who include a couple, the general prosecutor said.
The woman died from her injuries while the man is still in hospital. The couple have two children.
The motives for the attack remain unclear at this stage.
Police had rushed to the village after calls reporting that several people were lying in the street after a spate of gunfire.
“At the moment there is incomprehension and shock here in Valais,” police spokesman Jean-Marie Bornet said.
“The toll is very, very heavy. It’s a somber start to the year for the canton.”
Jean-Marie Bornet added that darkness had hampered police efforts to detain the suspect.
“It wasn’t easy to intervene in the darkness. The gunman turned his weapon on the officers, who had to shoot him in order not to be injured themselves.”
Nathalie Frizzi, an eyewitness who lives close to the scene of the shooting, told local daily Le Nouvelliste she had been walking her dog when she heard loud bangs.
“There were people running around near the chapel,” she is quoted as saying.
“At first I didn’t realize what was going. I thought children were shooting at cats and I called out for them to stop. I am still shocked that I could have been hit by a bullet.”
Gun attacks are rare in Switzerland, but shooting is a very popular sport in the country and the level of gun ownership is high.
There are an estimated two to three million guns in circulation, although no-one knows the exact number because there is no national firearms register.
In addition to the semi-automatic assault rifle that all those serving in the army store at home, there are thousands of hunting rifles and pistols.
Most towns and villages having a shooting club that meets for target practice at least once a week.
-ywNJuNP_qcImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…