A federal appeals court recently struck down Virginia's surviving sodomy law, which banned certain consensual sex acts for both gay and straight couples. Now, Virginia Attorney General Ken Cuccinelli is asking the court to hear the case again, a request that is drawing a strong backlash from the LGBT community.

Cuccinelli isn't the only lawmaker who supports legislating consensual sexual behavior: 13 other states have sodomy laws on the books. And even though the Supreme Court ruled a decade ago that such laws are an unconstitutional invasion of privacy, they are still used to throw Americans in jail.

U.S. states have been legislating so-called "crimes against nature", or "buggery" as it was known back in the day, ever since a ship master was executed by Virginia in 1625 for allegedly violating his male steward's "codpiece." While sodomy laws can legislate sex acts between heterosexual couples, they have been used most often to discriminate against LGBT individuals. Sodomy laws have been used to stop gay Americans from adopting and fostering children and gaining custody of their own kids. They have also been wielded in the workplace — like when Georgia's Attorney General rescinded a job offer to a lesbian lawyer because she was marrying a woman, and then successfully used the state's sodomy law to justify the discrimination.

"The cynical explanation of why these laws are still around is that it keeps members of the LGBT community in their place," Gregory Nevins, an attorney for Lambda Legal, told me.

According to the American Civil Liberties Union, Illinois was the first state to dump its anti-sodomy law, in 1961. By the end of the 1970s, 19 other states had repealed their laws. Then in 1998, a gay couple in Houston was arrested under Texas' anti-sodomy law for allegedly having sex (Dale Carpenter, a professor at the University of Minnesota Law School, argues that the love story concocted for the judges was false — instead, the men had no relationship, were fighting, and were not even having sex.) In any case, the resulting legal challenge, Lawrence v. Texas, went all the way to the Supreme Court. The justices determined in a 6-3 ruling that homosexuality wasn't a crime, and overturned the country's remaining sodomy laws.

But in 13 states (not including Virginia), the laws didn't actually disappear: Montana, Oklahoma, Texas, and Kansas still have laws specifically outlawing sex between gay Americans, and 9 other states outlaw anal or oral sex for for everyone. Mother Jones' Tim Murphy notes that "conservatives in those states know they can't enforce the laws, but by keeping them in the code, they can send a message that homosexuality is officially condemned by the government."

Carlos Maza, writing at Equality Matters, also argues that "the presence of sodomy laws can cause gays and lesbians to be dragged into humiliating, costly, and discriminatory legal disputes." He points to a 2008 case in North Carolina in which two men were arrested by the Raleigh Police Department for having consensual sex, and even though the charges were later dropped, one of the men said the "awful" ordeal "humiliated" him. The police captain in charge of the department at the time maintained that even though the Supreme Court had ruled sodomy laws unconstitutional, "The law is still on the book... What the D.A.'s office will do with it, I don't know."

In other states, sodomy laws have been used to prosecute men who are arrested for soliciting sex, and against men who are having unsavory sex — like with teenagers. In North Carolina, a man was convicted under a sodomy law for having (allegedly consensual) oral sex with a 16- and 17-year-old. (The teenagers were both over the state's legal age of consent.) This is also why Cuccinelli says he is defending Virginia's sodomy law — it's being used to prosecute a 47-year-old man who had sex with a 17-year-old girl, which in the state is only a misdemeanor. If the man is convicted of sodomy, he faces a felony charge.

Nevins argues that lawmakers should focus on making new laws that conform with the Supreme Court ruling — like, say, raising the age of consent in Virginia — rather than dredging up sodomy laws. "If you pass a law that says no one can drive a car and that law gets struck down, you can't later use it to prosecute someone who is committing a bank robbery in a getaway car," he argues. "It's just irresponsible that states have unconstitutional laws on the books."

But don't expect these states to get moving anytime soon: The Supreme Court struck down the ugly ban on interracial marriage in 1967. When did Alabama finally scrap its law? November 2000.