By the time of the 2003 Supreme Court decision, the laws in most states were no longer enforced or were enforced very selectively. This decision invalidated all state sodomy laws insofar as they applied to noncommercial conduct in private between consenting civilians and reversed the Court's 1986 ruling in Bowers v. Before that 2003 ruling, 27 states, the District of Columbia, and 4 territories had repealed their sodomy laws by legislative action, 9 states had had them overturned or invalidated by state court action, 4 states still had same-sex sodomy laws, and 10 states, Puerto Rico, and the U. military had laws applying to all regardless of gender.The continued existence of these rarely enforced laws on the statute books, however, was often cited as justification for discrimination against gay men and lesbians. In 2005 Puerto Rico repealed its sodomy law, and in 2006 Missouri repealed its law against "homosexual conduct".Jefferson intended this to be a liberalization of the sodomy laws in Virginia at that time, which prescribed death as the maximum penalty for the crime of sodomy. Prior to 1962, sodomy was a felony in every state, punished by a lengthy term of imprisonment or death.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.It specified that "every other felony, misdemeanor, or offence not provided for by this act, may and shall be punished as heretofore[.]" At the time, Maryland and Virginia had a penalty of 1–10 years for committing sodomy. In 1892, Congress passed a law for the District of Columbia that states that "for the preservation of the public peace and the protection of property within the District of Columbia." Labeled in the law as vagrants were "all public prostitutes, and all such persons who lead a notoriously lewd or lascivious course of life[.]" All offenders had to post bond of up to 0 for good behavior for a period of six months. In 1898, Congress deleted the word "notoriously" from the provision concerning a lewd or lascivious course of life, thereby allowing prosecution of those without notoriety.
In 2005, basing its decision on Lawrence, the Supreme Court of Virginia in Martin v.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. 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.At the time of the Lawrence decision in 2003, the penalty for violating a sodomy law varied very 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 receive a death sentence.