New York state added gender identity and gender expression to the state's anti-discrimination law Friday, making it illegal to deny people a job, housing, education or public accommodations because they are transgender.

Democratic Gov. Andrew Cuomo signed the measure into law in Manhattan at the Lesbian, Gay, Bisexual & Transgender Center. He also signed legislation prohibiting conversion therapy for minors, in which a therapist tries to change a young person's sexual orientation.

Both bills passed last week after being blocked for years in the state Senate by Republican lawmakers. That changed when Democrats won control of the chamber in November.

Get Breaking News Delivered to Your Inbox

The anti-discrimination bill adds gender identity and gender expression to the existing law banning discrimination based on gender, age, religion, race or sexual orientation.

"This, my friends, is New York at its best," Cuomo said to an audience of supporters as he prepared to sign the measure.

Cuomo issued an executive order in 2015 adding gender identity to the state's anti-discrimination rules. Supporters wanted the change made in statute, since Cuomo's executive order could be rescinded by a future governor while the entire Legislature must vote to repeal a statute.

Democrats in the state legislature have tried to pass the Gender Expression Non-Discrimination Act, or GENDA, for 16 years, but the bill was repeatedly shot down in the historically Republican-controlled state Senate. As Democrats took a sweeping majority in the state Senate in the 2018 election, they are now taking advantage of complete control of the state government by enacting progressive policies.

"These laws will literally save lives, and their passage would not have been possible without the tireless work of advocates and allies across New York over the last decade," said Chad Griffin, president of the Human Rights Campaign, the largest LGBTQ civil rights organization in the U.S.

Cuomo had also used his executive authority to prohibit insurers from covering any therapy involving conversion therapy for minors. The new statute goes further by fully outlawing it for young people. The practice has already been condemned by leading psychiatric and psychological associations.

New York is the 15th state to ban conversion therapy for minors. Twenty states and the District of Columbia have laws prohibiting discrimination based on gender identity.