The Alabama Court of Criminal Appeals unanimously ruled on Friday that the state's law banning consensual sodomy is unconstitutional.
The court took issue with the law's provision that "consent is no defense to a prosecution." The anti-sodomy law can still be applied in forced sex cases.
The decision stems from a 2010 court case in which Dewayne Williams was charged with first-degree sodomy and sexual misconduct for having anal sex. Williams claimed that the sex was consensual, while the male victim said it was forced. Williams was convicted on the misconduct charge.
In appeals, Williams' attorneys cited a 2003 ruling by the U.S. Supreme Court that found Texas' anti-sodomy law unconstitutional. Friday's ruling in Alabama is in line with the Court's decision.
According to the Human Rights Campaign, there are 11 other states that have laws banning sodomy. Equality Alabama Chairman Ben Cooper applauded the appeals court's decision.
"Each and every person, no matter their sexual orientation or gender identity, is entitled to equal protection under the law," he said in a statement.
"The Alabama court's unanimous decision overturning the statute is a step in the right direction and makes us optimistic for future and ongoing equal rights through the continued elimination of unconstitutional provisions in our state's constitution that violate privacy and equal protections."
Prosecutor Michael Jackson said that the appeals court decision is unfair because his client is a victim.
"He got attacked by another man and he had sex he didn't want to have," Jackson told the Montgomery Advertiser. The state asked to remove the consent language from the anti-sodomy law and retry Williams, but the Court of Criminal Appeals found that to grant such a request would be double jeopardy.
Alabama Attorney General Luther Strange has not released a statement regarding the court's decision.