After 16 years of attempts, the New York State Legislature has finally passed a bill that protects transgender people from discrimination.

In 100-40 and 42-19 votes on Tuesday morning, respectively, the State Assembly and the State Senate voted to pass the Gender Expression Non-Discrimination Act, or GENDA, which adds gender identity as a protected class in the areas of housing, employment, and public accommodations.

“This is truly an historic day,” Eric Lesh, executive director of the LGBT Bar Association of Greater New York, told The Daily Beast. “We are finally welcoming a fairer and more equal New York because of the bold and tireless leadership of trans and gender non-conforming New Yorkers.”

GENDA, which Governor Andrew Cuomo has pledged to sign into law, will solidify protections for the estimated 78,600 transgender adults who live in the state, according to the Williams Institute at the UCLA School of Law—especially those who live outside of New York City, where the human rights commission has had similar protections in place since 2002.

Gov. Cuomo, who commended the passage of GENDA shortly after the Senate vote, signed a 2015 executive order that barred anti-transgender discrimination—but as the Trump administration has shown, LGBT protections that aren’t enacted through legislation are all too easily rolled back.

The converse, of course, is that LGBT rights legislation can be difficult to pass, even in a reliably blue state like New York. GENDA, as LGBT news outlet Them reported last year, has been put forward in the New York State Legislature every year since 2003.

But even though GENDA cleared the State Assembly eight times since 2008, the historically Republican-controlled New York State Senate never voted in favor of the measure. Last year, for instance, GENDA died in a Senate committee, on the losing end of a 5-4 vote after clearing the Assembly in a 100-43 vote.

“ We’ve had a Senate that’s been dragging its heels, that’s been controlled by Republican legislators for so long—and that’s why a group of trans and LGBT people have been working their butts off to make sure that we brought about progressive change once and for all ”

In the meantime, as Lesh noted, several states—even those with much less progressive reputations than New York, like Utah and Iowa—have enacted their own gender identity protections. New York, Lesh told The Daily Beast, has been “sadly very behind in catching up to the urgent need that we face” to protect transgender people.

“I think the reason that it’s taken so long here in New York is because we have had a [State] Senate that is out of touch with the vast majority of New Yorkers,” said Lesh. “We’ve had a Senate that’s been dragging its heels, that’s been controlled by Republican legislators for so long—and that’s why a group of trans and LGBT people have been working their butts off to make sure that we brought about progressive change once and for all.”

Prospects for passing GENDA changed drastically with the 2018 midterm elections, in which a “blue wave” shifted power not only in Congress but in state legislatures and governor’s offices as well. That was the case in the New York State Senate as well, where periods of Democratic control since World War II have been few and fleeting, as the New York Times noted in the wake of the midterms.

The midterms secured a total of 39 State Senate seats to the Democrats—and so, after 15 years, the chances of passing GENDA skyrocketed overnight.

“Today’s historic action in New York is the result of years of hard work and it is a vivid illustration of the importance of electing pro-equality lawmakers,” said Human Rights Campaign president Chad Griffin in a statement.

On Monday, just three days into New York’s 2019 legislative session, the Senate Investigations and Government Operations Committee voted in favor of GENDA by a 6-0 vote, sending the bill to the floor. It was, as the LGBT advocacy group Equality New York noted, the first time in over 10 years that GENDA had been voted out of the committee.

One day later, the bill decisively passed both houses of the legislature—the first of several LGBT rights victories that advocacy groups expect an incoming batch of state legislators will help deliver in 2019. That includes a bill banning conversion therapy in New York State, which, like GENDA, has long faced obstacles in the Senate but was passed handily on Tuesday.

GENDA was co-sponsored by all 39 senators in the new Democratic majority—which as the bill’s lead sponsor Sen. Brad Hoylman noted in a press release, was the highest number of co-sponsors that GENDA has ever had in its decade-plus history.

Hoylman, who is openly gay and has long sought to pass LGBT protections in the New York State Senate, called the fight to pass GENDA “a long, emotional battle.”

But however long the battle, its resolution was remarkably swift.

“It’s just happening at lightning speed,” said Lesh. “After 17 years of fighting so hard, in one day it’s so clear how elections really matter.”