Utah struck down a redundant law banning sex outside of marriage Wednesday.

Utah Gov. Gary Herbert, a Republican, signed a bill into law that decriminalized fornication. Having sex outside of marriage in the conservative state had been a misdemeanor since 1973. Those found guilty could have faced up to six months in jail and a $1,000 fine, although the law was not enforced.

The bill decriminalizing sex before marriage was introduced jointly by both a Republican and a Democrat in the state legislature. Legislators in Utah also voted this year to undo other statutes that banned adultery and sodomy.

Despite the redundancy of the laws pertaining to what consenting adults do in their homes, some conservative lawmakers in Utah raised concerns about the moral state of society during the vote, which passed the House by less than 10 votes.

“What is legally is often far below what is morally right,” Rep. Keven Stratton said. “And I recognize our laws are not strong enough to rule a immoral people [sic.].”

Utah’s social conservatism is largely driven by religion. It has the largest Mormon population in the U.S., and in the state legislature, nine out of every 10 lawmakers belong to the Church of Latter-day Saints.