# Sodomy laws in the United States

The early United States inherited sodomy laws which constitutionally outlawed a variety of sexual acts deemed illegal, illicit, unlawful, unnatural or immoral from the colonial-era based laws of the United Kingdom in the 17th century. While these laws often targeted sexual acts between persons of the same sex, many sodomy-related statutes employed definitions broad enough to outlaw certain sexual acts between persons of different sexes, in some cases even including acts between married persons.
Through the mid to late 20th century, the gradual decriminalization of consensual sexual acts led to the elimination of anti-sodomy laws in most U.S. states. During this time, the Supreme Court upheld the constitutionality of its sodomy laws in Bowers v. Hardwick in 1986. In 2003, the Supreme Court reversed that decision with Lawrence v. Texas, which invalidated any state sodomy laws, some of which were still law in the following 14 states: Alabama, Florida, Idaho, Kansas, Louisiana, Michigan, Mississippi, Missouri, North Carolina, Oklahoma, South Carolina, Texas, Utah and Virginia.

## History
### Before Lawrence v. Texas

During the colonial era of American history, the various European nations which established colonies in the Americas brought their pre-existing sodomy laws (which included capital punishment) with them. The establishment of the United States after their victory in the Revolutionary War did not bring about many changes in these laws. Beginning in the 19th century, the various state legislatures passed legislation which ended the status of capital punishment being used for those who were convicted under sodomy laws. South Carolina was the last state, in 1873, to repeal the death penalty for sodomy law violations. The number of times the death penalty was carried out under sodomy laws is unclear. Records show there were at least two executions, and a number of convictions with vague labels, such as "crimes against nature".
According to one source, sodomy statutes in colonial America in the 17th century were largely unenforced as male-male eroticism did not threaten the social structure, challenge the gendered division of labor, or undermine the patriarchal ownership of wealth. There were gay men on General Washington's staff and among the leaders of the new republic, even though in Virginia there was a maximum penalty of death for sodomy. In 1779, Thomas Jefferson tried to reduce Virginia's maximum punishment for sodomy to castration, but it was rejected by the Virginia legislature.
Justice Anthony Kennedy authoring the majority opinion in Lawrence v. Texas stated that American laws targeting same-sex couples did not develop until the last third of the 20th century and that early sodomy laws seemed not to be enforced for private consensual acts.
Prior to 1962, sodomy was a felony in every state punished by a lengthy term of imprisonment or hard labor. In that year, the Model Penal Code (MPC) — developed by the American Law Institute to promote uniformity among the states as they modernized their statutes — struck a compromise that removed consensual sodomy from its criminal code while making it a crime to solicit for sodomy. In 1962, Illinois adopted the recommendations of the Model Penal Code and thus became the first state to remove criminal penalties for consensual sodomy from its criminal code, almost a decade before any other state. Over the years, many of the states that did not repeal their sodomy laws had enacted legislation reducing the penalty.
At the time of the Lawrence decision in 2003, the penalty for violating a sodomy law varied widely from jurisdiction to jurisdiction among those states retaining their sodomy laws. The harshest penalties were in Idaho, where a person convicted of sodomy could earn a life sentence. Michigan followed, with a maximum penalty of 15 years' imprisonment while repeat offenders got life. By 2002, 36 states had repealed their sodomy laws or their courts had overturned them. By the time of the 2003 Supreme Court decision, the laws in most states were no longer enforced or were enforced very selectively. The continued existence of these rarely enforced laws on the statute books, however, are often cited as justification for discrimination against gay men, lesbians, and bisexuals.
On June 26, 2003, the United States Supreme Court struck down in the Lawrence v. Texas decision the following jurisdictions (14 US states, 1 US territory and the Uniform Code of Military Justice) that statutes criminalized consensual sodomy: Alabama, Florida, Idaho, Kansas, Louisiana, Michigan, Mississippi, Missouri (rest of the state outside of the Missouri Court of Appeals, Western District), North Carolina, Oklahoma, Puerto Rico, South Carolina, Texas, United States Armed Forces, Utah and Virginia. On June 26, 2003, at the time of the Lawrence v. Texas decision, the following jurisdictions (20 US states, 1 US territory and the Uniform Code of Military Justice) had statutes criminalizing consensual sodomy: Alabama, Arkansas, Florida, Idaho, Kansas, Kentucky, Louisiana, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, North Carolina, Oklahoma, Puerto Rico, South Carolina, Texas, United States Armed Forces, Utah and Virginia.

#### New York

In 1950, New York enacted a new statute that divided the crime of sodomy into 3 degrees. First degree sodomy, with a maximum penalty of 20 years imprisonment, is defined as being done by force as in rape, or an act with an animal or a dead body. Second degree sodomy, with a maximum penalty of 10 years imprisonment, includes acts per os or per anum by a person over 21 years old with a person under 18 years old. Third degree sodomy, which is a misdemeanor with a maximum of 6 months in prison, is any act per os or per anum not amounting to first or second degree sodomy. With this new law, New York became the first state to reduce the crime of sodomy from a felony to a misdemeanor. A psychopathic offender law was included with this statute, but covered only sexual acts with minors or with the use of force or threats. In 1950, the Attorney General issued an opinion that the governing sodomy law covered both participants in an act of fellatio, the wording of the law being broader for oral sex than for anal. This opinion would be affirmed by a court interpretation more than a decade later.
In 1965, New York enacted a new statute repealing the crime of sodomy. Due to opposition to repealing the crime of sodomy, New York enacted a new statute at the same time that criminalized sodomy and reduced the maximum penalty from 6 months to 3 months, and excluded married couples. It created the category of sexual misconduct, defined as engaging in sexual intercourse with another person without such person's consent and engaging in sexual conduct with an animal or a dead human body, which became a class A misdemeanor. Since the new statute repealing the crime of sodomy would only be effective on September 1, 1967, it never took effect.

#### Idaho

In the early 1970s, Idaho laws fluctuated on sexual crimes. On March 12, 1971, the Idaho House of Representatives voted was 55-5 in favor of House Bill 161, which enacted the entire Model Penal Code (MPC) in Idaho, which included repealing common-law crimes and the "crime against nature" law. The bill passed the Idaho Senate on March 25, 1971 and the vote was 34-1. It was signed on April 9, 1971 by Governor Cecil Andrus. It took effect on January 1, 1972. On January 25, 1972, the Idaho House voted was 44-28 in favor of House Bill 101, which repealed the provisions of House Bill 161, which had adopted the MPC. The bill passed the Idaho Senate on March 27, 1972 and the vote was 30-5. It was signed on March 27, 1972 by Governor Cecil Andrus. It took effect on April 1, 1972. On March 22, 1972, the Idaho House voted was 49-15 in favor of House Bill 59, which restored a criminal code framework after the repeal of House Bill 161, which included reinstating common-law crimes and reintroduced the felony "crime against nature" law, which included a minimum five-year penalty with no maximum limit. The bill passed the Idaho Senate on February 1, 1972 and the vote was 34-1. It was signed on February 18, 1972 by Governor Cecil Andrus. It took effect on April 1, 1972.

### After Lawrence v. Texas

In 2005, Puerto Rico repealed its sodomy law, and in 2006, Missouri repealed its law against "homosexual conduct". In 2013, Montana removed "sexual contact or sexual intercourse between two persons of the same sex" from its definition of deviate sexual conduct, Virginia repealed its lewd and lascivious cohabitation statute, and sodomy was legalized in the US armed forces. In 2005, basing its decision on Lawrence, the Supreme Court of Virginia in Martin v. Ziherl invalidated § 18.2-344, the Virginia statute making fornication between unmarried persons a crime.
On January 31, 2013, the Senate of Virginia passed a bill repealing § 18.2-345, the lewd and lascivious cohabitation statute enacted in 1877. On February 20, 2013, the Virginia House of Delegates passed the bill by a vote of 62 to 25 votes. On March 20, 2013, Governor Bob McDonnell signed the repeal of the lewd and lascivious cohabitation statute from the Code of Virginia. On March 12, 2013, a three-judge panel of the Court of Appeals for the Fourth Circuit struck down § 18.2-361, the crimes against nature statute. On March 26, 2013, Attorney General of Virginia Ken Cuccinelli filed a petition to have the case reheard en banc, but the Court denied the request on April 10, 2013, with none of its 15 judges supporting the request. On June 25, Cuccinelli filed a petition for certiorari asking the U.S. Supreme Court to review the Court of Appeals decision, which was rejected on October 7.
On February 7, 2014, the Virginia Senate voted 40-0 in favor of revising the crimes against nature statute to remove the ban on same-sex sexual relationships. On March 6, 2014, the Virginia House of Delegates voted 100-0 in favor of the bill. On April 7, the Governor submitted a slightly different version of the bill. It was enacted by the legislature on April 23, 2014. The law took effect upon passage. On February 26, 2019, the Utah legislature voted to eliminate the crime of sodomy between consenting adults. Governor Gary Herbert signed the bill into law on March 26, 2019.
On May 23, 2019, the Alabama House of Representatives passed, with 101 voting yea and 3 absent, Alabama Senate Bill 320, repealing the ban on "deviate sexual intercourse". On May 28, 2019, the Alabama State Senate passed Alabama Senate Bill 320, with 32 yea and 3 absent. The bill took effect on September 1, 2019. Alabama is the southernmost continental state to repeal their sodomy law as of 2023.
On March 18, 2020, the Maryland legislature voted to repeal its sodomy law. The bill became law in May 2020 without the signature of Governor Larry Hogan. While the original text of the bill intended to repeal both the state's sodomy law and unnatural or perverted sexual practice law, amendments from the Maryland Senate urged to solely repeal the sodomy law. On March 31, 2023, the Maryland legislature voted to repeal the unnatural and perverted sexual practice law. The bill was sent to Governor Wes Moore for signature. As he did not veto the bill within 30 days of passage, Moore allowed for the bill to become law without his signature, and the repeal took effect on October 1, 2023.
In March 2022, Idaho repealed its sodomy law. The repeal was a result of a lawsuit brought on in September 2020 by a plaintiff known as John Doe. John Doe alleged his constitutional rights were violated when he was forced to register as a sex offender upon moving to Idaho due to a conviction for "oral sex" 2 decades prior. On May 17, 2023, the Minnesota legislature passed an Omnibus Judiciary and Public Safety Bill that included provisions repealing the state's sodomy, adultery, fornication, and abortion laws. On May 19, Governor Tim Walz signed the bill into law. It took effect the following day.
As of January 2025, the following jurisdictions (12 U.S. states) had statutes criminalizing consensual sodomy: Florida, Georgia, Kansas, Kentucky, Louisiana, Massachusetts, Michigan, Mississippi, North Carolina, Oklahoma, South Carolina, and Texas. These statutes penalties are not enforceable due to the binding precedent of Lawrence v. Texas, meaning consensual sodomy cannot be prosecuted.
* Florida (Fld. Stat. 800.02.)
* Georgia (O.C.G.A. § 16-6-2)
* Kansas (Kan. Stat. 21-3505.)
* Kentucky (KY Rev Stat § 510.100.)
* Louisiana (R.S. 14:89.)
* Massachusetts (MGL Ch. 272, § 34.) (MGL Ch. 272, § 35.)
* Michigan (MCL § 750.158.) (MCL § 750.338.) (MCL § 750.338a.) (MCL § 750.338b.)
* Mississippi (Miss. Code § 97-29-59.)
* North Carolina (G.S. § 14-177.)
* Oklahoma (§21-886.)
* South Carolina (S.C. Code § 16-15-60.)
* Texas (Tx. Penal Code § 21.06.)

## Sodomy laws by jurisdiction in the United States of America

Below is a table of sodomy laws in the jurisdictions in United States of America and penalties as applicable to the binding precedent of Lawrence v. Texas. The most recent jurisdiction to repeal its sodomy ban is Minnesota.
| Jurisdiction | Date statute struck down | Date statute repealed | Covered by statute | Covered by statute | Covered by statute | Covered by statute | Covered by statute | Covered by statute | Covered by statute | Covered by statute |
| Jurisdiction | Date statute struck down | Date statute repealed | Bestiality | Opposite-sex intercourse | Opposite-sex intercourse | Opposite-sex intercourse | Opposite-sex intercourse | Same-sex intercourse | Same-sex intercourse |
| Jurisdiction | Date statute struck down | Date statute repealed | Bestiality | Anal sex | Married intercourse | Oral sex | Unmarried intercourse | Anal sex | Oral sex |
| Jurisdiction | Date statute struck down | Date statute repealed | Alabama | #2003 (Lawrence v. Texas) | #2019 | Ala. Code 1975 § 13A-6-220 - 221 | | | | |
| Alaska | N/A | #1980 (sodomy) 1971 (crime against nature, unnatural carnal copulation by means of the mouth, or otherwise) | A.S. 11.61.140 | | | | | | | |
| American Samoa | N/A | #1979 | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| Arizona | N/A | #2001 | A.R.S. § 13-1411 | | | | | | | |
| Arkansas | #2001 (Jegley v. Picado) | #2005 1975 (law reinstated in 1977) | A.C.A. § 5-14-122 | | | | | | | |
| California | #N/A | #1976 | Cal. Penal Code § 286.5 | | | | | | | |
| Colorado | #N/A | #1972 | C. R. S. A. § 18-9-202 | | | | | | | |
| Connecticut | #N/A | #1971 | C. G. S. A. § 53a-73a | | | | | | | |
| Delaware | #N/A | #1973 | 11 Del.C. § 775 | | | | | | | |
| District of Columbia | #N/A | #1993 | D.C. Code § 22–1012.01. | | | | | | | |
| Florida | #2003 (Lawrence v. Texas; unnatural and lascivious act) 1971 (Franklin v. State; crimes against nature) | #1974 (crimes against nature) | West's F. S. A. 828.126 | West's F. S. A. 800.02 | West's F. S. A. 800.02 | West's F. S. A. 800.02 | West's F. S. A. 800.02 | West's F. S. A. 800.02 | West's F. S. A. 800.02 | West's F. S. A. 800.02 |
| Georgia | #1998 (Powell v. Georgia) | #N/A | O.C.G.A. § 16-6-6 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 | O.C.G.A. § 16-6-2 |
| Guam | #N/A | #1978 | 9 GCA § 70.40. | | | | | | | |
| Hawaii | #N/A | #1973 | HRS § 711-1109.8 | | | | | | | |
| Idaho | #2003 (Lawrence v. Texas) | #2022 1971 (law reinstated in 1972) | I.C. § 18-6602 | | | | | | | |
| Illinois | #N/A | #1962 | 720 I.L.C.S. 5/12-35 | | | | | | | |
| Indiana | #N/A | #1976 | I.C. 35-46-3-14 | | | | | | | |
| Iowa | #N/A | #1978 | I.C.A. § 717C.1 | | | | | | | |
| Kansas | #2003 (Lawrence v. Texas) | #1969 (opposite-sex intercourse) | K.S.A. 21-5504 | | | | | K.S.A. 21-5504 | K.S.A. 21-5504 |
| Kentucky | #1992 (Kentucky v. Wasson) | #1974 (opposite-sex intercourse) | KRS § 525.137 | | | | | KRS § 510.100 | KRS § 510.100 |
| Louisiana | #2003 (Lawrence v. Texas) | #N/A | LSA-R.S. 14:89.3 | LSA-R.S. 14:89 | LSA-R.S. 14:89 | LSA-R.S. 14:89 | LSA-R.S. 14:89 | LSA-R.S. 14:89 | LSA-R.S. 14:89 | LSA-R.S. 14:89 |
| Maine | #N/A | #1976 | 17 M.R.S.A. § 1031 | | | | | | | |
| Maryland | #1999 (Williams v. Glendening; anal sex) 1998 (Williams v. Glendening; opposite-sex oral sex and same-sex intercourse) 1990 (Schochet v. State; opposite-sex intercourse) | #2023 (unnatural and perverted sexual practice) 2020 (sodomy) | MD Code, Criminal Law, § 10-606. | | | | | | | |
| Massachusetts | #1974 (Commonwealth v. Balthazar) | #N/A | M.G.L.A. 272 § 77 M.G.L.A. 272 § 34 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 | M.G.L.A. 272 § 34 M.G.L.A. 272 § 35 |
| Michigan | #2003 (Lawrence v. Texas) 1990 (Michigan Organization for Human Rights v. Kelley; applied directly to Wayne County; uncertain whether ruling was binding statewide; reversed in 1992 in People v. Brashier) | #N/A | M.C.L.A. 750.158 | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b | M.C.L.A. 750.158 M.C.L.A. 750.338 M.C.L.A. 750.338a M.C.L.A. 750.338b |
| Minnesota | #2001 (Doe v. Ventura) | #2023 | M.S.A. § 609.294 | | | | | | | |
| Mississippi | #2003 (Lawrence v. Texas) | #N/A | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 | Miss. Code Ann. § 97-29-59 |
| Missouri | #2003 (Lawrence v. Texas; rest of the state outside of the Missouri Court of Appeals, Western District) 1999 (State of Missouri v. Cogshell; Missouri Court of Appeals, Western District only) | #2006 | V.A.M.S. 566.111 | | | | | | | |
| Montana | #1997 (Gryczan v. State) | #2013 (same-sex intercourse) 1974 (opposite-sex intercourse) | MCA 45-8-218 | | | | | | | |
| Nebraska | #N/A | #1978 | Neb. Rev. St. § 28-1010 Neb. Rev. St. 54-904 | | | | | | | |
| Nevada | #N/A | #1993 | N. R. S. 201.455 | | | | | | | |
| New Hampshire | #N/A | #1975 | N.H. Rev. Stat. § 644:8g | | | | | | | |
| New Jersey | #N/A | #1978 | N. J. S. A. 4:22-17 | | | | | | | |
| New Mexico | #N/A | #1975 | NMSA § 30-9A-3 | | | | | | | |
| New York | #1980 (New York v. Onofre; excluded the New York National Guard) | #2000 | McKinney's Penal Law § 130.20 | | | | | | | |
| North Carolina | #2003 (Lawrence v. Texas) | #N/A | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 | N.C.G.S.A. § 14-177 |
| Northern Mariana Islands | #N/A | #1983 | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A |
| North Dakota | #N/A | #1973 | NDCC, § 12.1-20-12 | | | | | | | |
| Ohio | #N/A | #1974 | R.C. § 959.21 | | | | | | | |
| Oklahoma | #2003 (Lawrence v. Texas; same-sex intercourse) 1988 (Newsom v. State; opposite-sex intercourse) | #N/A | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 | 21 Okl. St. Ann. § 886 |
| Oregon | #N/A | #1972 | O. R. S. § 167.333 | | | | | | | |
| Pennsylvania | #1980 (Commonwealth v. Bonadio) | #2022 (homosexuality) 1995 (unmarried opposite-sex intercourse and same-sex intercourse) 1972 (married opposite-sex intercourse) | 18 Pa.C.S.A. § 3129 | | | | | | | |
| Puerto Rico | #2003 (Lawrence v. Texas) | #2006 (opposite-sex anal sex and same-sex anal and oral sex) 1974 (opposite-sex oral sex) | P.R. Laws tit. 33, § 4773 | | | | | | | |
| Rhode Island | #N/A | #1998 | Gen.Laws 1956, § 11-10-1 | | | | | | | |
| South Carolina | #2003 (Lawrence v. Texas) | #N/A | Code 1976 § 16-15-120 | Code 1976 § 16-15-120 | Code 1976 § 16-15-120 | | Code 1976 § 16-15-120 | Code 1976 § 16-15-120 | |
| South Dakota | #N/A | #1977 | SDCL § 22-22-42 | | | | | | | |
| Tennessee | #1996 (Campbell v. Sundquist) | #1996 (same-sex intercourse) 1989 (opposite-sex intercourse) | T. C. A. § 39-14-214 | | | | | | | |
| Texas | #2003 (Lawrence v. Texas) 1970 (Buchanan v. Batchelor; reversed in 1971 by the United States Supreme Court) | #1974 (opposite-sex anal and oral sex) | V. T. C. A., Penal Code § 21.09 | | | | | V. T. C. A., Penal Code § 21.06 | V. T. C. A., Penal Code § 21.06 |
| United States Armed Forces | #2003 (Lawrence v. Texas) | #2013 | 10 U.S. Code § 934 - Art. 134. | | | | | | | |
| United States of America | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A |
| Utah | #2003 (Lawrence v. Texas) | #2019 1971 (law reinstated in 1972) | U.C.A. 1953 § 76-9-301.8 | | | | | | | |
| Vermont | #N/A | #1977 | 13 V.S.A. § 352 | | | | | | | |
| Virgin Islands of the United States | #N/A | #1985 | 14 V.I.C. § 2062 | | | | | | | |
| Virginia | #2003 (Lawrence v. Texas) | #2014 (anal and oral sex) 2013 (lewd and lascivious cohabitation) | Va. Code Ann. § 18.2-361 | | | | | | | |
| Washington | #N/A | #1976 | West's RCWA 16.52.205 | | | | | | | |
| West Virginia | #N/A | #1976 | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A | #N/A |
| Wisconsin | #N/A | #1983 | W.S.A. 944.18 | | | | | | | |
| Wyoming | #N/A | #1977 | W.S.1977 § 6-4-601 | | | | | | | |

### Federal law

Sodomy laws in the United States were largely a matter of state rather than federal jurisdiction, except for laws governing the District of Columbia and the U.S. Armed Forces.

### District of Columbia

In 1801, the 6th United States Congress enacted the District of Columbia Organic Act of 1801, a law that continued all criminal laws of Maryland and Virginia, with those of Maryland applying to the portion of the District ceded from Maryland and those of Virginia applying to the portion ceded from Virginia. As a result, in the Maryland-ceded portion, sodomy was punishable with up to seven years' imprisonment for free persons and with the death penalty for enslaved persons, whereas in the Virginia-ceded portion it was punishable between one and ten years' imprisonment for free persons and with the death penalty for enslaved persons. Maryland repealed the death penalty for slaves in 1809 and modified the penalty for all persons to match Virginia's terms of imprisonment. In 1847, the Virginia-ceded portion was given back to Virginia, thus only the Maryland law had effect in the district. In 1871, Congress enacted the District of Columbia Organic Act of 1871, a law that reorganized the district government and granted it home rule. All existing laws were retained unless and until expressly altered by the new city council. Direct rule was reinstated in 1874. The criminal status of sodomy became ambiguous until 1901, when Congress passed legislation recognizing common law crimes, punishable with up to five years' imprisonment or a fine of $1,000.
In 1935, Congress made it a crime in the district to solicit a person "for the purpose of prostitution, or any other immoral or lewd purpose". In 1948, Congress enacted the first law specific to sodomy in the district, which established a penalty of up to ten years in prison or a fine of up to $1,000, regardless of sexuality. Oral sex was included in the law's application. Also included with this law was a psychopathic offender law and a law "to provide for the treatment of sexual psychopaths". The metropolitan police department eventually had several officers whose sole job was to "check on homosexuals". Multiple court cases dealt with the issue in the following years. Many of the published sodomy and solicitation cases during the 1950s and 1960s reveal clear entrapment policies by the local police, some of which were disallowed by reviewing courts. In 1972, settling the case of Schaefers et al. v. Wilson, the D.C. government announced its intention not to prosecute anyone for private, consensual adult sodomy, an action disputed by the U.S. Attorney for the District of Columbia. The action came as part of a stipulation agreement in a court challenge to the sodomy law brought by four gay men.
In 1973, Congress again granted the district home rule through the District of Columbia Home Rule Act. It provided for a new city council that could pass its own laws. However laws regarding certain topics, such as changes to the criminal code, were restricted until 1977. All laws passed by the D.C. government are subject to a mandatory 30-day "congressional review" by Congress. If they are not blocked, then they become law. In 1981, the D.C. government enacted a law that repealed the sodomy law, as well as other consensual acts, and made the sexual assault laws gender neutral. However, the Congress overturned the new law. A successful legislative repeal of the law followed in 1993. This time, Congress did not interfere. In 1995, all references to sodomy were completely removed from the criminal code, and in 2004, the D.C. government repealed an outdated law against fornication.

### Military

Although the U.S. military discharged soldiers for homosexual acts throughout the eighteenth and nineteenth century, U.S. military law did not expressly prohibit homosexuality or homosexual conduct until February 4, 1921.
On March 1, 1917, the Articles of War of 1916 were implemented. This included a revision of the Articles of War of 1806, the new regulations detail statutes governing U.S. military discipline and justice. Under the category Miscellaneous Crimes and Offences, Article 93 states that any person subject to military law who commits "assault with intent to commit sodomy" shall be punished as a court-martial may direct.
On June 4, 1920, Congress modified Article 93 of the Articles of War of 1916. It was changed to make the act of sodomy itself a crime, separate from the offense of assault with intent to commit sodomy. It went into effect on February 4, 1921.
On May 5, 1950, the Uniform Code of Military Justice was passed by Congress and was signed into law by President Harry S. Truman, and became effective on May 31, 1951. Article 125 forbids sodomy among all military personnel, defining it as "any person subject to this chapter who engages in unnatural carnal copulation with another person of the same or opposite sex or with an animal is guilty of sodomy. Penetration, however slight, is sufficient to complete the offence."
As for the U.S. Armed Forces, the Court of Appeals for the Armed Forces has ruled that the Lawrence v. Texas decision applies to Article 125, severely narrowing the previous ban on sodomy. In both United States v. Stirewalt and United States v. Marcum, the court ruled that the "conduct [consensual sodomy] 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 include rape, 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 Lawrence in both United States v. Meno and United States v. Bullock.

#### Repeal

On December 26, 2013, President Barack Obama signed into law the National Defense Authorization Act for Fiscal Year 2014, which repealed the Article 125 ban on consensual sodomy.