Switzerland first abolished it in 1874 then later permitted it again and it was practiced by a few states (9 executions until 1940). Definite abolishment by popular vote in 1938, except for wartime military crimes, for which it was eliminated in 1992.....
Because of an increase in crime, which was likely due to the economic depression at the time, capital punishment was, however, re-introduced in 1879.
On December 21, 1937, in the course of the standardisation of Swiss criminal law, Swiss parliament passed a new criminal code, which abolished capital punishment, after fervid debates. It was ratified by referendum on July 3, 1938, and came into power on January 1, 1942. The last person to be sentenced to death by a civil court and executed was Hans Vollenweider, convicted of three murders and then executed on October 18, 1940 in Sarnen, Obwalden.
Swiss military law, however, still provided for the death penalty for treason. During World War II, 30 Swiss soldiers were sentenced to death and 17 of these were executed before the end of the war. This law was abolished by the Federal Assembly on March 20, 1992 after a parliamentary initiative by Massimo Pini of the Free Democratic Party of Switzerland.