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 deemed to be "illegal", "illicit", "unlawful", "unnatural" and/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 June 2024, 61 countries as well as three sub-national jurisdictions have laws that criminalize sexual activity between two individuals of the same-sex. In 2006 that number was 92. Among these 62 countries, 40 of them not only criminalize male same-sex sexual activity but also have laws that criminalize female same-sex sexual activity. In 11 of them, 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.

Criminalization
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. Pederasty in ancient Rome was acceptable only when the younger partner was a prostitute or slave.

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 death penalty for all crimes, became not only the first Western ruler to do so, but also the first ruler to abolish death penalty for sodomy (which was replaced by prison and hard labour).

In France, it was the French Revolutionary penal code (issued in 1791) which for the first time struck down "sodomy" as a crime, decriminalizing it together with all "victimless-crimes" (sodomy, heresy, witchcraft, blasphemy), 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 V.I. Lenin and Leon Trotsky, Russia legalized homosexuality. However, when Joseph Stalin came to power in 1920s, these laws were reversed until homosexuality was effectively made illegal again by the government.

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.

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 (Africa, some parts of Asia and Oceania and even in five out of the 13 countries in the Caribbean Islands), 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 2024, sodomy related laws have been repealed or judicially struck down in all of Europe, North America, and South America, except for Grenada, Guyana, Jamaica, Saint Lucia, 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, the Philippines, and Thailand.

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.

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.

Following the Wolfenden report, the Dunstan Labor government introduced a consenting adults in private type legal defence in South Australia in 1972. This defence was initiated as a bill by Murray Hill, father of former defence minister Robert Hill, and repealed the state's sodomy law in 1975. The Campaign Against Moral Persecution during the 1970s raised the profile and acceptance of Australia's gay and lesbian communities, and other states and territories repealed their laws between 1976 and 1990. The exception was Tasmania, which retained its laws until the Federal Government and the United Nations Human Rights Committee forced their repeal in 1997.

Male homosexuality was decriminalised in the Australian Capital Territory in 1976, then Norfolk Island in 1993, following South Australia in 1975 and Victoria in 1981. At the time of legalization (for the above), the age of consent, rape, defences, etc. were all set gender-neutral and equal. Western Australia legalised male homosexuality in 1989 – Under the Law Reform (Decriminalization of Sodomy) Act 1989, as did New South Wales and the Northern Territory in 1984 with unequal ages of consent of 18 for New South Wales and the Northern Territory and 21 for Western Australia. Then since 1997, the states and territories that retained different ages of consent or other vestiges of sodomy laws have tended to repeal them later; Western Australia did so in 2002, and New South Wales and the Northern Territory did so in 2003. Tasmania was the last state to decriminalise sodomy, doing so in 1997 after the groundbreaking cases of Toonen v Australia and Croome v Tasmania (it is also notable that Tasmania was the first jurisdiction to recognize same-sex couples in Australia since 2004 under the Relationships Act 2003 ). In 2016, Queensland became the final Australian jurisdiction to equalise its age of consent for all forms of sexual activity at 16 years, after reducing the age of consent for anal sex from 18 years.

Barbados
Before the December 2022 court ruling 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. The law was rarely enforced, however.

Botswana
Same-sex sexual acts became legal in Botswana on 11 June 2019. Previously, sodomy, whether heterosexual or homosexual, was criminalised, punishable by up to seven years' imprisonment. The law criminalising such sexual activity applied to both men and women. Initially, its application was limited to men only (similar to other colonies of the British Empire), however, a Botswana court found this to be discriminatory and that the law should apply to women as well.

Brazil
Brazilian criminal law does not punish any sexual act performed by consenting adults, but allows for prosecution, under statutory rape laws, when one of the participants is under 14 years of age and the other an adult, as per Articles 217-A of the Brazilian Penal Code. Pedophilic acts are also criminalized by the Children and Teenager Statute, in articles 241-A to 241-E. Article 235 of the Brazilian Military Criminal Code – DL 1.001/69-, however, does incriminate any contact deemed to be libidinous, be it of a homosexual nature or not, made in any location subject to military administration. Since the article is entitled "Of pederasty or other libidinous acts", gay rights advocates claim that, since the Brazilian armed forces are composed almost exclusively of males, the article allows for witch-hunts against homosexuals in the military service. This article of the Military Criminal Code has been ruled partially unconstitutional by the Brazilian Supreme Court (ADPF 291), in a 2019 decision that considered incompatible with the Constitution the expressions "Of pederasty or others" (mentioned in the entitlement) and "homosexual or not" (contained in the article).

Canada
Before 1859, the Province of Canada prosecuted sodomy under the English Buggery Act. In 1859, the Province of Canada enacted its own buggery law in the Consolidated Statutes of Canada as an offence punishable by death. Buggery remained punishable by death until 1869. A broader law targeting all homosexual male sexual activity ("gross indecency") was passed in 1892, as part of a larger update to the criminal law of the new dominion of Canada. Changes to the Criminal Code in 1948 and 1961 were used to brand gay men as "criminal sexual psychopaths" and "dangerous sexual offenders." These labels provided for indeterminate prison sentences. Most famously, George Klippert, a homosexual, was labelled a dangerous sexual offender and sentenced to life in prison, a sentence confirmed by the Supreme Court of Canada in 1967. He was released in July 1971.

Sodomy was decriminalized after the Criminal Law Amendment Act, 1968-69 (Bill C-150) received royal assent on 27 June 1969. The offences of buggery and "gross indecency" were still in force, however the new act introduced exemptions for married couples, and any two consenting adults above the age of 21 regardless of gender or sexual orientation. The bill had been originally introduced in the House of Commons in 1967 by then Minister of Justice Pierre Trudeau, who famously stated that "there's no place for the state in the bedrooms of the nation".

Revisions to the Criminal Code in 1987 repealed the offence of "gross indecency", changed "buggery" to "anal intercourse" and reduced the age exemption from 21 to 18. Section 159 of the Criminal Code continued to criminalize anal sex in general, with exemptions (provided no more than two people are present) for husbands and wives, and two consenting parties above the age of 18.

Subsequent case law held that section 159 was unconstitutional, thus anal sex was de facto legal between any two or more consenting persons above the age of consent (14). In the 1995 Court of Appeal for Ontario case R. v. M. (C.) the judges ruled that the law was unconstitutional on the basis that the specific exemptions based on marital status and age infringed on the equality rights guaranteed by section 15 of the Charter of Rights and Freedoms, and constituted discrimination based on sexual orientation. A similar decision was made by the Quebec Court of Appeal in the 1998 case R. v. Roy. In a 2002 decision regarding a case in which three people were engaged in sexual intercourse, the Court of Queen's Bench of Alberta declared section 159 in its entirety to be null, including the provisions criminalizing anal sex when more than two persons are taking part or present.

NDP MP Joe Comartin introduced private member's bills in 2007 and 2011 to repeal section 159 of the Criminal Code, however neither passed first reading.

In June 2019, C-75 passed both houses of the Parliament of Canada and received royal assent, repealing section 159 effective immediately and making the age of consent equal at 16 for all individuals.

Chile
Consensual sex between two same-sex adults was decriminalized in 1999, but with a higher age of consent set at 18. Since August 2022, the age of consent was equalised to 14 with heterosexuals under a recently implemented law.

China
Sodomy was never explicitly criminalized in China, but private sex between unmarried people was illegal until 1997, and same-sex marriage is not legal in China. The Chinese Supreme Court ruled in 1957 that voluntary sodomy was not a criminal act. Private sex in any form between two consenting adults does not currently violate any laws. However, if someone under 18 is involved, the adult partner will be prosecuted. In a notable case in 2002, a man who had anal intercourse with a teenager was sentenced to three and a half years in prison.

In Hong Kong "Homosexual Buggery" is prohibited. Before 2014, according to the Crimes Ordinance Section 118C, both of the two men must be at least 16 to commit homosexual buggery legally or otherwise both of them can be liable to life imprisonment. Sect 118F states that committing homosexual buggery not privately is also illegal and can be liable to imprisonment for 5 years.

"Heterosexual Buggery". A man who commits buggery with a girl under 21 can also be liable for life imprisonment (Sect 118D) while no similar laws concerning committing heterosexual buggery in private exist.

In 2005, Judge Hartmann found these 4 laws: Sect 118C, 118F, 118H, and 118J were discriminatory towards gay males and unconstitutional under the Hong Kong Basic Law and contrary to the Bill of Rights Ordinance in a judicial review filed by a Hong Kong resident. It was believed that the age of consent had been reduced from 21 to 16 for any kind of homosexual sex acts. In 2014, the ordinance was amended according to the judgement.

Cook Islands
Homosexuality was decriminalized in the Cook Islands by an act of Parliament on 1 June 2023. Prior to that, male homosexual activity was illegal in the Cook Islands under the Crimes Act 1969. Consensual male sodomy was punishable by up to seven years' imprisonment, while indecency between males was punishable by up to five years' imprisonment. The law was inherited from the former British Empire. Prosecutions were rare, however.

Denmark
In 1933, Denmark decriminalized homosexuality. The age of consent has been set at 15 since 1977.

Dominica
In April 2024, the High Court of Dominica ruled that sections 14 and 16 of the Sexual Offences Act, that criminalised consensual same-sex activity between adults, were unconstitutional.

Prior to that ruling, both male and female types of same-sex sexual activity were illegal in Dominica, as was anal intercourse between persons of the opposite sex.

France
Since the Penal Code of 1791, France has not had laws punishing homosexual conduct per se between over-age consenting adults in private. However, other qualifications such as "offense to good mores" were occasionally retained in the 19th century (see Jean Jacques Régis de Cambacérès).

In 1960, a parliamentary amendment by Paul Mirguet added homosexuality to a list of "social scourges", along with alcoholism and prostitution. This prompted the government to increase the penalties for public display of a sex act when the act was homosexual. Transvestites or homosexuals caught cruising were also the target of police repression.

In 1981, the 1960 law making homosexuality an aggravating circumstance for public indecency was repealed. Then in 1982, under president François Mitterrand, the law from 1942 (Vichy France) making the age of consent for homosexual sex higher (18) than for heterosexual sex (15) was also repealed, despite the vocal opposition of Jean Foyer in the National Assembly.

Germany
Paragraph 175, which punished "fornication between men", was eased to an age of consent of 21 in East Germany in 1957 and in West Germany in 1969. This age was lowered to 18 in the East in 1968 and the West in 1973, and all legal distinctions between heterosexual and homosexual acts were abolished in the East in 1988, with this change being extended to all of Germany in 1994 as part of the process of German Reunification.

In modern German, the term Sodomie has a meaning different from the English word "sodomy": it does not refer to anal sex, but acts of zoophilia. The change occurred mostly in the middle of the 19th century, at least in the last decade of the century. Only the moral theology of the Roman Catholic church changed not until some time after World War II to the term homosexuality.

Gibraltar
In Gibraltar, a British overseas territory, male homosexual acts (but not heterosexual anal sex) have been decriminalised since 1993, when the age of consent was 18 for male homosexual acts. Then under a Supreme Court decision in April 2011, the age of consent became 16, regardless of sexual orientation and/or gender. At the same time, under the same decision, heterosexual anal sex was also decriminalised as well. In August 2011, the new gender-neutral Crimes Act 2011 was approved, which sets an equal age of consent of 16 regardless of sexual orientation, and reflects the decision of the Supreme Court in statute.

Hungary
Homosexuality in Hungary was decriminalized in 1962, Paragraph 199 of the Hungarian Penal Code from then on threatened "only" adults over 20 who engaged themselves in a consensual same-sex relationship with an underaged person between 14 and 20. Then in 1978 the age was lowered to 18. Since 2002, by the ruling of the Constitutional Court of Hungary repealed Paragraph 199 – Which provided an equal age of consent of 14, regardless of sexual orientation and/or gender. Since 1996, the Unregistered Cohabitation Act 1995 was provided for any couple, regardless of gender and/or sexual orientation and from 1 July 2009 the Registered Partnership Act 2009 becomes effective, and provides a registered partnership just for same-sex couples – since that opposite-sex already have marriage, this would in-turn create duplication.

Iceland
Homosexuality has been legal in Iceland since 1940, but equal age of consent was not approved until 1992. Civil union was legalised by Alþingi in 1996 with 44 votes pro, 1 con, 1 neutral and 17 not present. Those laws were changed to allow adoption and artificial insemination for lesbians 27 June 2006 among other things. Same-sex marriage was legalised in 2010.

India
On 2 July 2009, in the case of Naz Foundation v National Capital Territory of Delhi, the High Court of Delhi struck down much of S. 377 of the IPC as being unconstitutional. The Court held that to the extent S. 377 criminalised consensual non-vaginal sexual acts between adults, it violated an individual's fundamental rights to equality before the law, freedom from discrimination and to life and personal liberty under Articles 14, 15 and 21 of the Constitution of India. The High Court did not strike down S. 377 completely – it held the section was valid to the extent it related to non-consensual non-vaginal intercourse or to intercourse with minors – and it expressed the hope that Parliament would soon legislatively address the issue.

India does not recognize same-sex unions of any type. On 11 December 2013, the Supreme Court of India overturned the ruling in Naz Foundation v. National Capital Territory of Delhi, effectively re-criminalizing homosexual activity until action was taken by parliament. However, on 12 July 2018, a Constitution bench of the Supreme Court of India started hearing a review petition over its 2013 judgment. Then on 6 September 2018, the Supreme Court struck down the part of S. 377 de-criminalizing consensual homosexual activities, but upheld that other aspects of S. 377 criminalizing unnatural sex with minors and animals will remain in force.

Ireland
In the Republic of Ireland, the Criminal Law (Sexual Offences) Act 1993 abolished the offence of "buggery between persons". For some years prior to 1993, criminal prosecution had not been made for buggery between consenting adults. The 1993 Act created an offence of "buggery with a person under the age of 17 years", penalised similar to statutory rape, which also had 17 years as the age of consent. The Criminal Law (Sexual Offences) Act 2006 replaced this offence with "defilement of a child", encompassing both "sexual intercourse" and "buggery". Buggery with an animal is still unlawful under Section 69 of the Sexual Offences Act 2003. In 2012, a man was convicted of this offence for supplying a dog in 2008 to a woman who had intercourse with it and died; he received a suspended sentence and was required to sign the sex offender registry, ending his career as a bus driver.

Israel
The State of Israel inherited its sodomy ("buggery") law from the legal code of the British Mandate of Palestine, but it was never enforced against homosexual acts that took place between consenting adults in private. In 1963, the Israeli Attorney-General declared that these laws would not be enforced. However, in certain criminal cases, defendants were convicted of "sodomy" (which includes oral sex), apparently by way of plea bargains; they had originally been indicted for more serious sexual offenses.

In the late 1960s, the Israeli Supreme Court ruled that these laws could not be enforced against consenting adults. Though unenforced, these laws remained in the penal code until 1988, when they were formally repealed by the Knesset. The age of consent for both heterosexuals and homosexuals is 16 years of age.

Italy
In 1786, Pietro Leopoldo of Tuscany, abolishing death penalty for all crimes, became not only the first Western ruler to do so, but also the first ruler to abolish death penalty for sodomy (though this was replaced with other sentences such as terms in prison or of hard labour).

The Code Napoléon made sodomy legal between consenting adults above the legal age of consent in all Italy except in the Kingdom of Sardinia, the Austria-ruled Kingdom of Lombardy–Venetia, and the Papal states.

In the newborn (1860) Kingdom of Italy, Sardinia extended its legal code on the whole of Northern Italy, but not in the South, which made homosexual behaviour legal in the South and illegal in the North. However, the first Italian penal code (Codice Zanardelli, 1889) decriminalised same-sex intercourse between consenting adults above the legal age of consent for all regions; the law has not changed since it was enacted.

Japan
In the Meiji Period, sex between men was punishable under the sodomy laws announced in 1872 and revised in 1873. This was changed by laws announced in 1880 (同性愛に関する法と政治). Since that time no further laws criminalizing homosexuality have been passed.

Mauritius
Consensual sodomy was decriminalized by the Supreme Court of Mauritius in a decision dated 4 October 2023, which found that the criminal code provision banning sodomy was unconstitutional. Same-sex intercourse between women was never illegal.

Previously, Section 250(1) of the Mauritius Criminal Code of 1838 held that "Any person who is guilty of the crime of sodomy ... shall be liable to penal servitude for a term not exceeding 5 years." Under the Supreme Court's 2023 judgement, the section should "be read so as to exclude such consensual acts from [its] ambit."

Namibia
The High Court of Namibia in Windhoek ruled that Namibia's common law crimes of “sodomy” and “unnatural sexual offences” were unconstitutional and invalid on 21 June 2024. The court also ruled on the same day that the inclusion of references to the crime of sodomy in the Criminal Procedure Act, Immigration Act, and Defense Act were similarly unconstitutional and invalid.

New Zealand
New Zealand inherited the United Kingdom's sodomy laws in 1854. The Offences Against The Person Act of 1867 changed the penalty of buggery from execution to life imprisonment for "Buggery". In 1961 in a revision of the Crimes Act, the penalty was reduced to a maximum of 7 years between consenting adult males.

Homosexual sex was legalised in New Zealand as a result of the passing of the Homosexual Law Reform Act 1986. The age of consent was set at 16 years, the same as for heterosexual sex.

North Korea
No explicit anti-gay criminal law exists, but government media depicts LGBT people negatively and some gay couples have been executed for being "against the socialist lifestyle".

Norway
Same-sex sexual activity between men has been legal in Norway since 1972.

Poland
Poland is one of the few countries where homosexuality has never been considered a crime. Forty years after Poland lost its independence, in 1795, the sodomy laws of Russia, Prussia, and Austria came into force in the occupied Polish lands. Poland retained these laws after independence in 1918, but they were never enforced, and were officially abandoned in 1932.

Russia
In the past, in Russia sexual activity between males was criminalized by state law on 4 March 1934. Sexual activity between females was not mentioned in the law. On 27 May 1993, homosexual acts between consenting males were decriminalized.

Saint Kitts and Nevis
Following a ruling of the Eastern Caribbean Supreme Court on August 29, 2022, consensual same-sex intercourse between adults in private is no longer illegal in Saint Kitts and Nevis.

Previously, Sections 56 and 57 of the "Offences Against the Person Act" criminalized same-sex sexual activity. The Court ruled that the sections violated the Saint Kitts and Nevis constitutional provisions guaranteeing a right to privacy and freedom of expression. The ruling had immediate effect.

In 2011, the government of St. Kitts and Nevis said it had no mandate from the people to abolish the criminalization of homosexuality among consenting adults. However, despite the existence of the law on the books, there had been no known prosecution of same-sex sexual activity according to the government.

Serbia
The Socialist Federal Republic of Yugoslavia restricted the offense in 1959 to only apply to homosexual anal intercourse, with the maximum sentence reduced from 2 to 1 year imprisonment. In 1994, male homosexual sexual intercourse was officially decriminalised in the Republic of Serbia, a part of the Federal Republic of Yugoslavia. The age of consent was set at 18 years for anal intercourse between males and 14 for other sexual practices. An equal age of consent of 14 was later introduced on 1 January 2006 with the adoption of a new Criminal Code, regardless of sexual orientation or gender.

Singapore
Section 377A of the Singapore Penal Code, introduced during British colonial rule, criminalised "outrage of decency" and additionally punish commission, solicitation, or attempted male same-sex "gross indecency", with "imprisonment of up to two years".

Section 377 was added by the British in 1858 for its colonies. The law was inherited into Singapore in 1871, with 377A introduced into the Penal Code in 1938. In October 2007, during a Penal Code review, Singapore repealed Section 377 of the Penal Code, but 377A remained on the books as an unenforced law. On 29 November 2022, the Parliament of Singapore voted to repeal Section 377A in its entirety. It was officially repealed on 3 January 2023 and struck off the books.

South Africa
The common-law crimes of sodomy and "commission of an unnatural sexual act" in South Africa's Roman-Dutch law were declared to be unconstitutional (and therefore invalid) by the Witwatersrand Local Division of the High Court on 8 May 1998 in the case of National Coalition for Gay and Lesbian Equality v Minister of Justice, and this judgment was confirmed by the Constitutional Court on 9 October of the same year. The ruling applied retroactively to acts committed since the adoption of the Interim Constitution on 27 April 1994.

Despite the abolition of sodomy as a crime, the Sexual Offences Act, 1957 set the age of consent for same-sex activities at 19, whereas for opposite-sex activities it was 16. This was rectified by the Criminal Law (Sexual Offences and Related Matters) Amendment Act, 2007, which comprehensively reformed the law on sex offences to make it gender- and orientation-neutral, and set 16 as the uniform age of consent. In 2008, even though the new law had come into effect, the former inequality was retrospectively declared to be unconstitutional in the case of Geldenhuys v National Director of Public Prosecutions.

South Korea
Sexual relationships between members of the same sex are legal under civilian law, but are regarded as sexual harassment in the Military Penal Code.

Sweden
Sweden legalized homosexuality in 1944. The age of consent is 15, regardless of whether the sexual act is heterosexual or homosexual, since equalization in 1978. The Swedish Criminal Code (SFS 1962:700), chapter six ('About Sexual Crimes'), shows gender-neutral terms and does not distinguish between sexual orientation.

Bestiality was legalized at the same time as homosexuality, i.e. in 1944. It was again criminalized in 2014. The relevant legal provision is today found in Chapter 2, 10 § of the Swedish Animal Welfare Act of 2018: "It is forbidden to perform sexual acts with animals. The prohibition does not cover acts performed for veterinary reasons or in connection with breeding or for similar legitimate reasons." Violations of this provision is punishable with a fine or with imprisonment for a maximum of two years (Chapter 10, 2 § of the above Act).

Taiwan
Explicit prohibitions of "consenting ji jian (雞姦; sodomy)" were abolished around 1912, when the Republic of China was established. The criminal code contained no provisions prohibiting consensual same-sex sexual activity between adults. Despite the decriminalization, LGBT people were often harassed and detained under general public order laws. These laws were repealed during the transition to democracy in 1991.

In Taiwan, the Criminal Code of the Republic of China officially focusing on sexual assaults. Article 10 defines anal intercourse to be a form of sexual intercourse, along with vaginal and oral intercourse. Article 277 set the age of consent at 16. Child and Youth Sexual Transaction Prevention Act Article 22 make it a criminal offense to engage in sexual contact with minors.

Thailand
Anti-sodomy legislation was repealed in Thailand in 1956.

Turkey
In Turkey, homosexual acts had already been decriminalized by its predecessor state, the Ottoman Empire in 1858.

Decriminalisation and abolition
In England, the first relaxation of the law came from the Wolfenden Report, published in 1957. The key proposal of the report was that "homosexual behaviour between consenting adults in private should no longer be a criminal offence". However, the law was not changed until 1967, when the Sexual Offences Act 1967 decriminalized consensual "homosexual acts" as long as only two men were involved, both were over 21 and the acts happened in private. The Act concerned acts between men only, and anal sex between men and women remained an offence until 1994.

In the 1980s and 1990s, gay rights organizations made attempts to equalize the age of consent for heterosexual and homosexual activity, which had previously been 21 for homosexual activity but only 16 for heterosexual acts. Heterosexual sodomy, however, ironically remained illegal until the 1994 Criminal Justice and Public Order Bill, although it was mainly applied in cases of anal rape. Efforts were also made to modify the "no other person present" clause so that it dealt only with minors. In 1994, Conservative MP Edwina Currie introduced as part of the 1994 bill an amendment which would have lowered the age of consent to 16. The amendment failed, but a compromise amendment which lowered the age of consent to 18 was accepted. 1 July 1997 decision in the case Sutherland v. United Kingdom resulted in the Sexual Offences (Amendment) Act 2000 which further reduced it to 16, and the "no other person present" clause was modified to "no minor persons present".

It was not until 2000, with the Sexual Offences (Amendment) Act 2000, that the age of consent for anal sex was reduced to 16 for men and women. In 2003, the Sexual Offences Act significantly reformed English law in relation to sexual offences, introducing a new range of offences relating to underage and non-consensual sexual activity that were concerned with the act that occurred, rather than the sex or sexual orientation of those committing it. Buggery in as much as it related to sexual intercourse with animals (bestiality) remained untouched until the Sexual Offences Act 2003, when it was replaced with a new offence of "intercourse with an animal".

Today, the universal age of consent is 16 in England, Scotland, Wales and Northern Ireland. The Sexual Offences (Northern Ireland) Order 2008 brought Northern Ireland into line with the rest of the United Kingdom on 2 February 2009 (prior to that, the age of consent for both heterosexual and homosexual intercourse was 17). The three British Crown dependencies also have an equal age of consent at 16: since 2006, in the Isle of Man; since 2007, in Jersey; and since 2010 in Guernsey.

Sodomy is usually interpreted as referring to anal intercourse between two males or a male and a female. In England and Wales sodomy was made a felony by Henry VIII's Buggery Act 1533, which was part of the attack on the monasteries, though had been a crime punished by the clergy until 1534. The Buggery Act 1533 also criminalised sex with animals. Section 61 of the Offences against the Person Act 1861, entitled "Sodomy and Bestiality", defined punishments for "the abominable Crime of Buggery, committed either with Mankind or with any Animal". The punishment for those convicted was the death penalty until 1861 in England and Wales, and 1887 in Scotland. James Pratt and John Smith were the last two to be executed for sodomy in England in 1835. However, all homoerotic acts could be prosecuted under the 1533 law as they were all treated by the courts as "attempts" to commit the felony (sodomy) whether there had been an actual attempt to commit anal intercourse or not. This interpretation was in place by at least the 1690s. Thereafter, it was possible to prosecute all homoerotic acts, invitations, or suggestions as "attempts" to commit the felony or conspiracies to arrange it. Between 1806, when reliable figures begin, and 1900, there were more than 8,000 cases of what were called "unnatural offences," including 404 capital sentences and 56 executions (all before 1835). Some confusion over the state of the law and what it covered has resulted from the intervention of Henry Labouchere, who, in 1885 introduced a clause to the Criminal Law Amendment Act that outlawed "gross indecency" between men "in public and private." Many historians have assumed as a result that before that date homoerotic acts were not covered by the law, or were only prosecuted if committed in public. This is not the case. Labouchere's Amendment added nothing to the law except another way of describing what was already illegal. Following the Wolfenden report, sexual acts between two adult males, with no other people present, were made legal in England and Wales in 1967, in Scotland in 1980, Northern Ireland in 1982, UK Crown Dependencies Guernsey in 1983, Jersey in 1990 and Isle of Man in 1992.

The definition of sodomy was not specified in these or any statute, but rather established by judicial precedent. Over the years the courts have defined buggery as including either: but not any other form of "unnatural intercourse", the implication being that anal sex with an animal would not constitute buggery. Such a case has not, to date, come before the courts of a common law jurisdiction in any reported decision. In the 1817 case of Rex v. Jacobs, the Crown Court ruled that oral intercourse with a child aged 7 did not constitute sodomy, but it could still be prosecuted as an "attempt" to commit the felony.
 * 1) Anal intercourse or oral intercourse by a man with a man or woman or
 * 2) Vaginal intercourse by either a man or a woman with an animal,

At common law consent was not a defence nor was the fact that the parties were married. In the UK, the punishment for buggery was reduced from hanging to life imprisonment by the Offences against the Person Act 1861. As with the crime of rape, buggery required that penetration must have occurred, but ejaculation was not necessary.

United States
Sodomy laws in the United States were largely a matter of state rather than federal jurisdiction, except for laws governing the US Armed Forces. In the 1950s, all states had some form of law criminalizing sodomy. In the early 1960s, the penalties for sodomy in the various states varied from imprisonment for two to ten years and/or a fine of US$2,000. Illinois became the first American jurisdiction to repeal its law against consensual sodomy in 1961; in 1962, the Model Penal Code recommended all states do so.

In the 1986 Bowers v. Hardwick decision upholding Georgia's sodomy law, the United States Supreme Court ruled that nothing in the United States Constitution bars a state from prohibiting sodomy.

By 2002, 36 states had repealed all sodomy laws or had them overturned by court rulings. In 2003, only 10 states had laws prohibiting all sodomy, with penalties ranging from 1 to 15 years imprisonment. Additionally, four other states had laws that specifically prohibited same-sex sodomy. On June 26, 2003, the US Supreme Court in a 6–3 decision in Lawrence v. Texas struck down the Texas same-sex sodomy law, ruling that this private sexual conduct is protected by the liberty rights implicit in the due process clause of the United States Constitution, with Sandra Day O'Connor's concurring opinion arguing that they violated equal protection. This decision invalidated all state sodomy laws insofar as they applied to noncommercial conduct in private between consenting civilians.

The Court of Appeals for the Armed Forces has ruled that the Lawrence v. Texas decision applies to Article 125 of the Uniform Code of Military Justice, which is a ban on sodomy in the US Armed Forces. In both United States v. Stirewalt and United States v. Marcum, the court ruled that the "conduct falls within the liberty interest identified by the Supreme Court", but went on to say that despite the application of Lawrence to the military, Article 125 can still be upheld in cases where there are "factors unique to the military environment" that would place the conduct "outside any protected liberty interest recognized in Lawrence." Examples of such factors could be fraternization, public sexual behavior, or any other factors that would adversely affect good order and discipline. Convictions for consensual sodomy have been overturned in military courts under the Lawrence precedent in both United States v. Meno. and United States v. Bullock.

As of 2024, 12 states still had laws against consensual sodomy; in 2013, police in East Baton Rouge Parish, Louisiana, arrested gay men for "attempted crimes against nature" despite the law having been ruled unconstitutional and unenforceable.

Ethiopia
In Ethiopian history, the recognition of same-sex activity is generally obscure, which means little evidence left for scholarly research. However, The Life and Struggles of Our Mother Wälättä P̣eṭros (1672) is the first reference of homosexuality between nuns in Ethiopian literature. In the country's Constitution's Article 629, same-sex activity is criminalized with up to 15 years to life imprisonment.

According to the Pew Research Center in 2007, 97% of Ethiopians said that homosexuality is a way of life that society should not accept, marking the highest level of rejection after Mali. The Ethiopian Orthodox Tewahedo Church plays a significant role in maintaining society's opinion against homosexuality, and some members form anti-gay movements. One of them is "Zim Anlem" founded by Dereje Negash, who is strongly affiliated with the Church.

Among the Maale people of southern Ethiopia, historian Donald Donham documented "a small minority [of men] crossed over to feminine roles. Called "ashtime", these (biological) males dressed like women, performed female tasks, cared for their own houses, and apparently had sexual relations with men". They were also protected by the king.

Kenya
Swedish anthropologist Felix Bryk reported active (i.e., insertive), and also mentioned "homo-erotic bachelors" among the pastoralist Nandi and Maragoli (Wanga). The Nandi as well as the Maasai would sometimes cross-dress as women during initiation ceremonies.

Iran
Homosexual sex is illegal in Iran and is punishable by execution, imprisonment, lashings, and fines.

Iraq
In 2024, there were plans to make homosexual relations in Iraq punishable by up to death, but the law was revised before being quietly passed later that year to lower the punishment to 15 years in jail with fines and deportation.

Macau
In Macau, according to the Código Penal de Macau (Penal Code of Macau) Article 166 & 168, committing anal coitus with someone under the age of 17 is a crime and shall be punished by imprisonment of up to 10 years (committing with whoever under 14) and 4 years (committing with whoever between 14 and 16) respectively.

Malawi
Demone talks about how Malawi culture does not value homosexuality as something acceptable in their culture. British Colonial rule included laws against homosexuality, which influenced later government policies. Although Malawi gained its independence from Britain in 1964, Malawi officials kept their anti-homosexuality laws enforced.

In 2010, there was a case in Malawi about a man named Steven Monjeza Soko and a transgender woman, named Tiwonge Chimbalanga Kachepa, who had an engagement ceremony, were caught by the Malawi Police and charged. The court denied bail and sentenced both Soko and Kachepa to prison. The court did not have evidence of sexual activity and based the sentence on the grounds that Soko and Kachepa had the ceremony.

In Malawi prisons, there is documented homosexual behavior. During 1980s and early 1990s, President Hasting Kamuzu Banda ignored the massive rise in of HIV/AIDS. In the late 1990s and early 2000s, Malawians became increasingly educated on HIV/AIDS, but they associated it with homosexual behavior.

Malaysia
Sodomy is illegal in Malaysia. The sodomy laws are sometimes enforced using Section 377 of the Penal Code which prohibits carnal intercourse against the order of nature:

"Any person who has sexual connection with another person by the introduction of the penis into the anus or mouth of the other person is said to commit carnal intercourse against the order of nature."

The age of consent in Malaysia is 16. Punishment for voluntarily committing carnal intercourse against the order of nature shall be up to twenty years imprisonment and whipping, while punishment for committing the same offence but without consent is punished by no less than five years imprisonment and whipping.

There was a notable case involving Anwar Ibrahim, former Leader of the Opposition and deputy prime minister who was convicted of sodomy crime under Section 377B of the Penal Code. However, it is debatable whether or not the sodomy law can be enforced consistently.

Uganda
The Anti-Homosexuality Act, 2023 prescribes up to twenty years in prison for "promotion of homosexuality", life imprisonment for "homosexual acts", and the death penalty for "aggravated homosexuality". The latter offence includes "serial offenders", same-sex rape, sex in a position of authority or procured by intimidation, sex with persons older than seventy-five, sex with the disabled and mentally ill, and homosexual acts committed by a person with a previous conviction of homosexuality. Further, under its provisions, the promotion (including normalisation) of homosexuality is punishable by imprisonment for up to 20 years and fines. This Act came into force in 2023, making Uganda the only Christian-majority country to punish some types of consensual same-sex acts with the death penalty. A similar law had been passed in 2013, but was later struck down in 2014 as unconstitutional by the Constitutional Court of Uganda on legal technicalities.

Zimbabwe
Zimbabwe's Former President Robert Mugabe has waged a violent campaign against homosexuals, claiming that before colonization, Zimbabweans did not engage in homosexual acts. His first major public condemnation of homosexuality came during the Zimbabwe International Book Fair in August 1995. He told the audience that homosexuality: "...degrades human dignity. It's unnatural and there is no question ever of allowing these people to behave worse than dogs and pigs. If dogs and pigs do not do it, why must human beings? We have our own culture, and we must re-dedicate ourselves to our traditional values that make us human beings... What we are being persuaded to accept is sub-animal behaviour and we will never allow it here. If you see people parading themselves as lesbians and gays, arrest them and hand them over to the police!"

In September 1995, Zimbabwe's parliament introduced legislation banning homosexual acts. In 1997, a court found Canaan Banana, Mugabe's predecessor and the first President of Zimbabwe, guilty of 11 counts of sodomy and indecent assault. Banana's trial proved embarrassing for Mugabe, when Banana's accusers alleged that Mugabe knew about Banana's conduct and had done nothing to stop it. Regardless, Banana fled Zimbabwe only to return in 1999 and served one year in prison for his homosexual acts. Banana was also stripped of his priesthood.