Capital punishment in Sweden was last used in 1910, though it remained a legal sentence for at least some crimes until 1973. It is now outlawed by the Swedish Constitution, which states that capital punishment, corporal punishment, and torture are strictly prohibited. At the time of the abolition of the death penalty in Sweden, the legal method of execution was beheading. It was one of the last states in Europe to abolish the death penalty. 
The clause that prohibits the death penalty has been a part of the Constitution since 1975. Sweden is a state party to the Second Optional Protocol to ICCPR (ratified in 1990), Protocol No. 6 to ECHR (1984), and Protocol No. 13 to ECHR (2003).
In the Riksdag of the Estates, a majority of the peasants worked for the abolition of the death penalty, for example when the new penalty code of 1864 was discussed.
Two titles were used for the official who carried out the execution: skarprättare, who carried out beheadings and bödel, who carried out other types of capital punishment. Originally beheading by sword was reserved for nobles, where as commoners could be beheaded by axe or hanged. By the 18th century all beheadings were made by axe, for commoners and nobles alike, and some crimes such as forgery always carried the punishment of hanging. During the 19th century, each province of Sweden along with the City of Stockholm had an appointed executioner who travelled the area to carry out executions. In 1900, a national executioner (Swedish: riksskarprättare) was appointed, a position that was filled by the last executioner Albert Gustaf Dahlman who until then had been responsible for carrying out executions in Stockholm.
Johan Alfred Ander was the last person executed in Sweden. He was sentenced to death for a murder during the course of a robbery that was committed in January 1910. His sentence was not commuted and he was executed 23 November at Långholmen in Stockholm using a guillotine. It was the only time a guillotine was used in Sweden (after being replacing manual beheading in 1906) and the only execution under King Gustaf V of Sweden. The executioner was Albert Gustaf Dahlman, who died in 1920. At his death at 72, he was the last of all executioners in Sweden.
Mohammed Beck Hadjetlaché, an exiled monarchist and member of the White movement, received the last death sentence in Sweden, on 28 May 1920, for robbery-homicide of three Russian nationals, all supposed Bolshevik sympathisers in the so-called Ryssvillan ("Russian villa") in 1919, though the crimes, denounced as particularly gruesome and meticulously planned, may have claimed another four victims, all missing to this day. His accomplices received lesser penalties, and after appeal, the death sentence (as was practice at the time) was changed in Svea Hovrätt (appellate court) to a lifetime of hard labour. Hadjetlaché allegedly succumbed to mental illness in jail, and died in confinement in Långholmen in 1929.
The last woman sentenced to death – also the last death sentence not to be reprieved – was the "angelmaker" Hilda Nilsson, who was sentenced to the guillotine on 14 July 1917 for the murder of several infant children. She preempted the execution by hanging herself in her cell in Landskrona Citadel. It is suggested that a decision to commute the sentence had in fact been taken, but if so she did not know of it at the time of her suicide.
The last woman executed was Anna Månsdotter, who was executed on 7 August 1890 by decapitation with an axe. Månsdotter and her son Per Nilsson had murdered Per's wife, Hanna Johansdotter. Månsdotter was also involved in an incestuous relationship with her son, who was sentenced to life imprisonment and who was released in 1914. The last woman executed in the capital of Stockholm was Helena Katarina Löv, who was decapitated for the murder of a child on 19 September 1829.
The last public executions in Sweden were carried out 18 May 1876. Both executions, by means of beheading, are supposed to have been carried out at the same time in the morning, at 7. The executed were Konrad Lundqvist Petterson Tector and Gustav Erikson Hjert and the executions were carried out at Stenkumla Backe near Visby and at Lidamon (near Malmköping). Both had been sentenced to death for the same crime, a failed robbery against a stagecoach two years earlier, which resulted in the murder of one of the passengers and the driver of the coach. The executions were carried out by Per Petter Christiansson Steineck and Johan Fredrik Hjort.
The last time a method other than beheading was practiced was in 1836; the method used was hanging by the neck. Although it was not subsequently used, it remained available as a form of capital punishment until the Penal Code of 1864 removed that option.
The last time a death sentence was carried out for any other crime than murder was on 10 August 1853 when Mårten Persson was executed for aggravated assault at Rögla (near Ystad). The last execution carried out for a non-fatal assault was on 29 March 1837, when Anders Gustaf Lindberg was beheaded in Stockholm.
In 1778, the last known execution for bestiality in Sweden happened.
Between 1800 and 1866, 644 executions were carried out in Sweden, the second highest per-capita number in Europe after Spain. In 1864, the Penal Code was reformed and the use of capital punishment was severely restricted, rather than abolished (as had been proposed), and hanging was abolished. In the following years (from 1866) up until the abolishment of the death penalty in 1921, fifteen people were executed (out of about 120 sentenced). The only crime that after 1864 carried a mandatory death sentence was the slaying of a prison guard by a prisoner serving life sentence. Two of the executions carried out after 1864 were for this crime; the execution of Jonas Magnus Jonasson Borg in 1866 and the execution of Carl Otto Andersson in 1872.
Today, most political circles are opposed to the idea of reintroducing the death penalty, although it has had support from the Sweden Democrats from 1988 to 1998. The party omitted it as an official policy after the party program was updated in 1998, although individuals within the party continue to support the death penalty for serious crimes such as murder and infanticide.