Montana legislators are considering changing a law that prohibits consensual sex between gay couples, causing a heated debate despite the law being deemed unconstitutional in 1997.

A Montana House Judiciary Committee met on Friday to read Senate Bill 107 (SB107), which aims to change a statute in Montana legislation that currently criminalises sex between consenting adult same-sex couples.

The statute in question prohibits “deviate sexual relations”, which it defines as: “sexual contact or sexual intercourse between two persons of the same sex or any form of sexual intercourse with an animal.”

In 1997 the Montana Supreme Court ruled the anti-gay element of the law unconstitutional, which was backed up by a judgement by the United States Supreme Court on all state “anti-sodomy” laws in 2003.

However, the statute remains in Montana law as previous attempts to change it have failed, with a similar bill to SB107 failing to get past the House Committee in 2011.

The Montana Republican Party continued to officially back the anti-gay law until as recently as 2010, stating: “We support the clear will of the people of Montana expressed by legislation to keep homosexual acts illegal.”

SB107 passed in the Montana Senate 39 votes to 11, but now faces the same panel that rejected changing the law in 2011.

Democratic Senator Christine Kaufmann spoke in support of changing the law from her perspective as a lesbian, saying the anti-gay statute was “only there to remind people that we are indeed second-class citizens, that we are unworthy, that Montana is not a welcoming place for us, that we are despised.”

Opponents of SB107 include Dallas Erickson of Montana Citizens for Decency Through Law, who said he “dreads that we are slouching toward Gomorrah” by considering changing the statute.

Some also argued that removing the statute would make it more difficult to prosecute child molesters, prompting the Montana County Attorney Association Representative to point out that such cases are prosecuted under Jessica’s Law, which is unrelated to the statute.

Linda Gryczen, the plaintiff who took the issue to the Supreme Court in 1997, said the statute was a violation of the private lives of consenting adults by the state.