|Sex and the law|
(varies by jurisdiction)
|Sex offender registration|
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 by courts to include any sexual act deemed to be "unnatural" or "immoral". Sodomy typically includes anal sex, oral sex, and bestiality. In practice, sodomy laws have rarely been enforced against heterosexual couples, and have mostly been used to target homosexual couples.
As of April 2023, 65 countries as well as three sub-national jurisdictions[a] have laws criminalizing homosexuality. In 2006 that number was 92. Among these 65 countries, 42 criminalize not only male homosexuality but also female homosexuality. In 11 of them, homosexuality is punished with the death penalty.: 15
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.
The Middle Assyrian Law Codes (1075 BC) 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.: 86, 224 : 63, 67–68  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.: 225  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.: 293
In England, Henry VIII introduced the first legislation under English criminal law against sodomy with the Buggery Act of 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.
|Never been illegal|
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 the People's Republic of China, Taiwan, 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.
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 six 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 2022, sodomy related laws have been repealed or judicially struck down in all of Europe, North America, and South America, except for Dominica, 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.
|Being LGBTI should be a crime||% Agree||% Disagree|
|Trinidad and Tobago||20||52|
Soviet legislation does not recognize so-called crimes against morality. Our laws proceed from the principle of protection of society and therefore countenance punishment only in those instances when juveniles and minors are the objects of homosexual interest ... while recognizing the incorrectness of homosexual development ... our society combines prophylactic and other therapeutic measures with all the necessary conditions for making the conflicts that afflict homosexuals as painless as possible and for resolving their typical estrangement from society within the collective