(CNN)Arizona just delivered a big victory for LGBTQ rights.
State lawmakers voted to repeal a decades-old law that prevented LGBTQ students from receiving medically accurate information in health education classes at school.
The law, which had been on the books since 1991, banned HIV/AIDS instruction that "promotes a homosexual lifestyle," "portrays homosexuality as a positive alternative lifestyle" and "suggests that some methods of sex are safe methods of homosexual sex."
The repeal passed the state House and Senate with bipartisan support, and on Thursday, Republican Gov. Doug Ducey signed it into law.
Democratic lawmakers praised the victory.
"For the past 18 years, this law has amounted to an official state-sanctioned climate of discrimination," House Democratic Leader Charlene Fernandez said in a statement on Wednesday. "I am so proud of my colleagues who voted yes today to put this chapter in the rear-view mirror and move our state forward."
Rep. Daniel Hernandez Jr. got emotional in a speech on the House floor, recounting his time in Arizona's public schools under the law.
"It's a really important win today to be able to have this because the struggles and the challenges that I went through as a student in our public schools where I was labeled as alternative, labeled as an other, will be going away today," he said.
Civil rights groups, some of which had challenged the law in court, also weighed in.
"A state law that explicitly demeaned and dismissed LGBTQ students and their relationships could not help but encourage abuse and discrimination at school," Michael Soto, executive director of Equality Arizona, said in a statement. "We are glad to see it erased from the books and are grateful to the LGBTQ leaders and allies who made the repeal possible."
Equality Arizona had filed a lawsuit challenging the law two weeks ago along with Lambda Legal and the National Center for Lesbian Rights.
The lawsuit had alleged that the law violated the Equal Protection Clause of the 14th Amendment because it singled out students who are not heterosexual for negative treatment based on their sexual orientation.