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 have laws that criminalize sexual activity between 2 individuals of the same-sex. In 2006, that number was 92. Laws in 40 of these 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 (1075 BCE) 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 (which is first described in documents dating back to 50 BCE) imposed penalties on those who committed a sex crime (stuprum) 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 civil law against sodomy with the Buggery Act 1533 in 1533, making buggery punishable by death. This act provided the foundation for anti-sodomy laws that eventually were exported around the world under British colonial rule; out of 62 UN Member States the International Lesbian, Gay, Bisexual, Trans and Intersex Association found to be criminalizing homosexuality as of March 2023, more than 30 of them had kept the law from when they were under British colonial rule.

Decriminalization

In 1786 Pietro Leopoldo of Tuscany became the first ruler in the world to end the death penalty, including for the crime of sodomy.Aaron, Michael. pgs. 58-59. Modern Sexuality: The Truth about Sex and Relationships. United States: Rowman & Littlefield Publishers, 2016. In France, the Penal Code of 1791 decriminalized sodomy; this was followed by the Napoleon Penal Code in 1810, which decriminalized sodomy in the part of continental Europe that had been conquered by France, which was most of it.Aaron, Michael. pg. 59. Modern Sexuality: The Truth about Sex and Relationships. United States: Rowman & Littlefield Publishers, 2016.

In 1830, Emperor Pedro I of Brazil signed a law into the Imperial Penal Code, eliminating all references to sodomy.Beyond Carnival. Green, James. The University of Chicago Press. 1999.

During the Ottoman Empire, homosexuality was decriminalized in 1858 as part of wider reforms during the Tanzimat period.

The death penalty for sodomy was not lifted in England and Wales until 1861. (Section: "Gay rights prior to the 20th century")

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 (1918–1938), 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.

Lawrence v. Texas, 539 U.S. 558 (2003), is a landmark decision of the United States Supreme Court in which the Court ruled that U.S. state laws criminalizing sodomy between consenting adults are unconstitutional. At the time of the Lawrence decision, ten states—Alabama, Florida, Idaho, Louisiana, Mississippi, North Carolina, South Carolina, Michigan, Utah, and Virginia—still banned consensual sodomy without respect to the sex of those involved, and four—Texas, Kansas, Oklahoma, and Missouri (partially)—prohibited same-sex couples from engaging in anal and oral sex.The New York Times: Supreme Court Strikes Down Texas Law Banning Sodomy", June 26, 2003, accessed July 16, 2012

Criminalization in modern days 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 (which recognises but does not perform same-sex marriages), Japan, Kazakhstan, and Thailand.UNDP, USAID (2014). Being LGBT in Asia: Thailand Country Report, p. 21. Bangkok. Retrieved 21 April 2024.

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

Sodomy-related legal positions by country Countries where same-sex sex is legal

Albania

On 20 January 1995 the Albanian Parliament legalized consensual same-sex sexual relations in Albania.

Andorra

Same-sex sexual activity is legal in Andorra. A law prohibiting same-sex sexual activity was abolished in 1791.

Angola

Angola legalized same-sex sexual activity in 2021.

Antigua and Barbuda

On 5 July 2022, the Eastern Caribbean Supreme Court ruled that sections of the Penal Code that made consensual same-sex intimacy illegal in Antigua and Barbuda were unconstitutional, and therefore void.

Argentina

Same-sex sexual activity was legalized in Argentina in 1887.Myers, JoAnne. Historical Dictionary of the Lesbian and Gay Liberation Movements. Pg. 64. United States: Scarecrow Press, 2013.

Armenia

Homosexual sex became legal in Armenia in 2003.

Australia

Upon colonisation in 1788, Australia inherited laws from the United Kingdom including the Buggery Act 1533. These were retained in the criminal codes passed by the various colonial parliaments during the 19th century, and by the state parliaments after Federation.

Male homosexual activity was legalized in South Australia on 2 October 1975 (there was a defense to a charge of male homosexual activity if both parties in were private and over 21 from 9 November 1972, but male homosexual activity offenses remained until the 1975 repeal), in the Australian Capital Territory on 8 November 1976, in Victoria on 1 March 1981, in the Northern Territory on 1 January 1984, in New South Wales on 8 June 1984, in Western Australia on 23 March 1990,"An offence against The Criminal Code section 181(1) or (3) as in force before 23 March 1990." in Queensland on 19 January 1991, and in Tasmania on 14 May 1997.

Austria

Homosexual sex was legalized in 1971 in Austria.

Azerbaijan

Azerbaijan regained its independence in 1991, and in 2000 repealed its Soviet-era anti-sodomy law.Spartacus International Gay Guide, p. 1216. Bruno Gmunder Verlag, 2007.

The Bahamas

Same-sex relationships between consenting adults became legal in the Bahamas in 1991. However, the criminal code still requires a higher age of consent for homosexual acts. The legal age of consent to engage in sexual activity is 16 for straight couples and 18 for same-sex couples.

Bahrain

Homosexuality was decriminalized in Bahrain in 1976.

However, although no law explicitly criminalizes same-sex sex, authorities have used broadly-phrased penal code provisions against "indecency" and "immorality" or "debauchery" () to target people who have it.

Barbados

Before the December 2022 ruling by the Barbados High Court that struck down buggery and gross indecency laws in Barbados, same-sex and different-sex anal and oral sex were criminalised in Barbados under Chapter 154, Sections 9 and 12 of the Sexual Offences Act. Section 9 criminalised "buggery," regardless of whether the act was done in private and consensual, or whether it was done between two men or a man and a woman. Section 12 criminalised "serious indecency," which was defined as any act "involving the use of the genital organs for the purpose of arousing or gratifying sexual desire." Punishment for "buggery" was life imprisonment, while the maximum penalty for "serious indecency" was ten years in prison if the act was committed on or towards a person aged 16 or older.

Belarus

In 1994, homosexuality was decriminalized in Belarus.

Belgium

Same-sex sexual activity has been legal since 1795, when the country was a French possession.State-sponsored Homophobia A world survey of laws prohibiting same sex activity between consenting adults

Belize

Homosexual sex was decriminalized in Belize in 2016.

Benin

Homosexual sex is legal in Benin.

Bhutan

As amended in 2021, Section 213 of the Bhutan Penal Code states: A defendant shall be guilty of the offence of unnatural sex, if the defendant engages in sexual conduct that is against the order of nature. However, homosexuality between adults shall not be considered unnatural sex. Previously, the code said a defendant was guilty of unnatural sex "if the defendant engages in sodomy or any other sexual conduct that is against the order of nature."

Bolivia

Same-sex sexual activity has been legal in Bolivia since 1832.

Bosnia and Herzegovina