The state of South Carolina has settled a lawsuit against its ban on discussing LGBTQ people in school sex education curricula and agreed not to enforce the law anymore.

LGBTQ organizations hailed the ruling, saying that the law was discriminatory because it singled out LGBTQ people and that it effectively encouraged bullying in schools.

Related: European court hands Russia stinging defeat in ‘gay propaganda’ case

“I know how frustrating it can feel to be told by a teacher that they can’t talk about who you are,” junior Eli Bundy said in a press release. The student organizes a school GSA.

“I’m so grateful that no other South Carolina student will have to go through school feeling like they have been erased.”

A 1988 law in South Carolina bans schools from discussing “alternate sexual lifestyles from heterosexual relationships,” specifically “homosexual relationships.” The law allows for LGBTQ people to be discussed “in the context of instruction concerning sexually transmitted diseases,” presumably to reinforce the association of LGBTQ people and disease.

A coalition of LGBTQ organizations filed a lawsuit this past February to get the state to stop enforcing the law.

“The state law sends a message to students that ‘homosexual relationships’ are so shameful or dangerous that they can only be discussed in a negative context,” said Julie Wilensky of the National Center for Lesbian Rights, one of the organizations that sued South Carolina.

They argued that the law violates the Constitution’s Equal Protection Clause because it singles out one group of students.

Also in February, South Carolina Attorney General Alan Wilson issued an opinion that said, “A court would likely conclude that this provision is unconstitutional.” He said that the law likely violates the Equal Protection Clause.

Judge David Norton signed the consent decree for the settlement. The consent decree also orders the state’s superintendent of education to circulate a memo to all school districts informing them that the law should no longer be taken into consideration when deciding curriculum.