Sodomy law
A sodomy law is a law that defines certain sexual acts as crimes. The precise sexual acts meant by the term sodomy are rarely spelled out in the law, but are typically understood and defined by many courts and jurisdictions to include any or all forms of sexual acts that are illegal, illicit, unlawful, unnatural, or immoral. Sodomy typically includes anal sex, oral sex, manual sex, and bestiality. In practice, sodomy laws have rarely been enforced to target against sexual activities between individuals of the opposite sex, and have mostly been used to target against sexual activities between individuals of the same sex.
As of September 2025, 63 countries as well as 3 sub-national jurisdictions have laws that criminalize sexual activity between 2 individuals of the same-sex. In 2006 that number was 92. Laws in 40 of these 62 countries criminalize both male and female same-sex sexual activity. In 11 countries, sexual activity between two individuals of the same-sex is punishable with the death penalty.
In 2011, the United Nations Human Rights Council passed an LGBT rights resolution, which was followed up by a report published by the UN Human Rights Commissioner which included scrutiny of the mentioned codes. In March 2022, the Committee on the Elimination of Discrimination against Women found that laws criminalizing consensual same-sex activity between women are a human rights violation. This case, brought by Rosanna Flamer-Caldera, was the first United Nations case to focus on lesbian and bisexual women.
History
Criminalization
BCE
The Middle Assyrian Law Codes state: If a man has intercourse with his brother-in-arms, they shall turn him into a eunuch. This is the earliest known law condemning the act of male-to-male intercourse in the military.In the Roman Republic, the Lex Scantinia imposed penalties on those who committed a sex crime against a freeborn male minor. The law may also have been used to prosecute male citizens who willingly played the passive role in same-sex acts. The law was mentioned in literary sources but enforced infrequently; Domitian revived it during his program of judicial and moral reform. It is unclear whether the penalty was death or a fine. For adult male citizens to experience and act on homoerotic desire was considered permissible, as long as their partner was a male of lower social standing.
CE
Intolerance of same-sex acts appears to have intensified in the Roman Empire in the late 4th century; in 390 the emperor Theodosius ordered that male prostitutes were to be publicly burned, although it is uncertain to what extent this decree was actually carried out.Starting in the 1200s, the Roman Catholic Church launched a campaign against homosexual activity. Between the years 1250 and 1300, homosexual activity was criminalized in most of Europe, possibly even punishable by death.
In England, Henry VIII introduced the first legislation under English criminal law against sodomy with the Buggery Act 1533, making buggery punishable by hanging, a penalty not lifted until 1861. Following Sir William Blackstone's Commentaries on the Laws of England, the crime of sodomy has often been defined only as the "abominable and detestable crime against nature", or some variation of the phrase. This language led to widely varying rulings about what specific acts were encompassed by its prohibition.
Decriminalization
In 1786 Pietro Leopoldo of Tuscany, abolishing the death penalty for all crimes, became not only the first Western ruler to do so, but also the first ruler to abolish the death penalty for sodomy.In France, it was the French Revolutionary penal code which for the first time struck down "sodomy" as a crime, decriminalizing it together with all "victimless-crimes", according with the concept that if there was no victim, there was no crime. The same principle was held true in the Napoleon Penal Code in 1810, which was imposed on the large part of Europe then ruled by the French Empire and its cognate kings, thus decriminalizing sodomy in most of Continental Europe.
In 1830, Emperor Pedro I of Brazil signed a law into the Imperial Penal Code. It eliminates all references to sodomy.
During the Ottoman Empire, homosexuality was decriminalized in 1858 as part of wider reforms during the Tanzimat period.
The death penalty was not lifted in England and Wales until 1861.
In 1917, following the Bolshevik Revolution led by Vladimir Lenin and Leon Trotsky, Russia legalized homosexuality. However, when Joseph Stalin came to power in 1920s, these laws were reversed. Homosexuality remained effectively illegal until 1993, after the fall of the Soviet Union, when sodomy was once again decriminalized.
During the First Czechoslovak Republic, there was a movement to repeal sodomy laws. It has been claimed that this was the first campaign to repeal anti-gay laws that was spearheaded primarily by heterosexuals.
After the publishing of the 1957 Wolfenden report in the UK, which asserted that "homosexual behaviour between consenting adults in private should no longer be a criminal offence", many western governments, including many U.S. states, repealed laws specifically against homosexual acts. However, by 2003, 13 U.S. states still criminalized homosexuality, along with many Missouri counties, and the territory of Puerto Rico, but in June 2003, the U.S. Supreme Court ruled in Lawrence v. Texas that state laws criminalizing private, non-commercial sexual activity between consenting adults at home on the grounds of morality are unconstitutional since there is insufficient justification for intruding into people's liberty and privacy.
There have never been Western-style sodomy related laws in Taiwan, People's Republic of China, North Korea, South Korea, Poland, or Vietnam. Additionally, Vietnam, Laos and Cambodia were part of the French colony of Indochina; male homosexual acts have been legal throughout the French Empire since the issuing of the aforementioned French Revolutionary penal code in 1791.
Criminalization in modern days
This trend among Western nations has not been followed in all other regions of the world, where sodomy remains a crime. For example, male homosexual acts, at least in theory, could result in life imprisonment in Barbados until 2022, and can theoretically still result in life imprisonment in Guyana, although the legislation is not enforced.As of 2025, sodomy-related laws have been repealed or judicially struck down in all of Europe, North America, and South America, except for Grenada, Guyana, Jamaica, and Saint Vincent and the Grenadines.
In Africa, male homosexual acts remain punishable by death in Mauritania and some parts of Nigeria and Somalia. Male and sometimes female homosexual acts are minor to major criminal offences in many other African countries; for example, life imprisonment is a prospective penalty in Tanzania, Uganda and Zambia. A notable exception is South Africa, where same-sex marriage is legal.
In Asia, male homosexual acts remain punishable by death in Afghanistan, Iran, Qatar, Saudi Arabia, the United Arab Emirates, and Yemen. Anti-sodomy laws have been repealed in Israel, Japan, Kazakhstan, and Thailand.
| Being LGBTI should be a crime | % Agree | % Disagree |
| Nigeria | 59 | 23 |
| Ghana | 54 | 25 |
| Pakistan | 54 | 28 |
| Uganda | 53 | 31 |
| Saudi Arabia | 49 | 32 |
| Jordan | 47 | 31 |
| Kenya | 46 | 37 |
| UAE | 45 | 32 |
| Egypt | 44 | 35 |
| Zimbabwe | 44 | 33 |
| Algeria | 43 | 35 |
| Iraq | 43 | 35 |
| Kazakhstan | 41 | 45 |
| Morocco | 39 | 39 |
| Indonesia | 38 | 37 |
| Malaysia | 35 | 40 |
| Turkey | 31 | 48 |
| India | 31 | 50 |
| Russia | 28 | 55 |
| Israel | 24 | 59 |
| Poland | 23 | 53 |
| Ukraine | 22 | 56 |
| South Africa | 22 | 61 |
| UK | 22 | 61 |
| Jamaica | 20 | 47 |
| Trinidad and Tobago | 20 | 52 |
| Philippines | 20 | 59 |
| China | 20 | 59 |
| Serbia | 19 | 58 |
| Bolivia | 18 | 54 |
| Dominican Republic | 18 | 56 |
| France | 17 | 58 |
| Vietnam | 17 | 61 |
| Peru | 16 | 57 |
| Australia | 15 | 66 |
| Netherlands | 15 | 76 |
| Nicaragua | 14 | 56 |
| Ecuador | 14 | 59 |
| Colombia | 13 | 60 |
| Venezuela | 13 | 60 |
| Chile | 13 | 65 |
| United States | 13 | 65 |
| Argentina | 13 | 67 |
| Canada | 13 | 69 |
| Spain | 13 | 72 |
| Japan | 12 | 61 |
| Mexico | 12 | 62 |
| Costa Rica | 12 | 64 |
| New Zealand | 12 | 64 |
| Ireland | 12 | 73 |
| Brazil | 11 | 68 |
| Italy | 11 | 74 |
| Croatia | 9 | 72 |
| Portugal | 9 | 75 |