(Getty)

Utah could repeal an anti-gay law which bans the “advocacy of homosexuality” in schools.

The bill to repeal the law is headed for the desk of Republican Governor Gary Herbert, and he could now sign or veto it.

The law, which effectively bans positive discussion of LGBT+ issues, is the subject of a lawsuit by several students, Equality Utah and the National Center for Lesbian Rights.

Legislators hope that the repeal of the law will mean the end of the lawsuit.

Equality Utah and the National Center for Lesbian Rights in January released a statement saying that the anti-LGBT laws create a “chilling culture of silence that stigmatises LGBTQ students.”

But the Senate in Utah on Wednesday passed a final version of a bill to replace the words “advocacy of homosexuality” with “advocacy of premarital or extramarital sexual activity.”

It passed with 27 votes to 1, after passing in the House with 68-1.

Despite still not being very forward thinking in terms of sex and relationships education, it brings the state law in line for same or opposite-sex activity.

GLSEN reports that at least seven other states hav similar laws.

They appear on the books of Alabama, Arizona, Louisiana, Mississippi, Oklahoma, South Carolina, and Texas.

The executive director of Equality Utah, Troy Williams, celebrated the vote saying: “This is a historic day for LGBTQ students in Utah.”

“We commend Sen. Adams and the Utah legislature for recognizing that LGBTQ students should be treated with the same respect and dignity as straight students. The removal of discriminatory language from school curriculum will send a positive message that all students are valued in Utah.”

But the state still has a long way to go in terms of LGBT equality.

Last month it rejected a bill to update its sex education curriculum, and a bill was also rejected which would have stopped parents from defending themselves for kicking out their child on the grounds of their sexual orientation or gender identity.