A senate committee in New York voted against a bill that would have added gender identity to the state’s human rights law.

The Gender Expression Non-Discrimination Act (GENDA) was defeated in the New York Senate Investigations & Government Operations Committee on a 5-4 party-line vote. New York remains one of three states that bans discrimination on the basis of sexual orientation but not gender identity.

Earlier this month, the Democratic-controlled Assembly passed the bill with a 100-43 vote. If the state senate had passed the bill, then it would have gone to the Democratic governor to be signed.

The New York Senate has a 32-31 Democratic majority, but one Democratic senator caucuses with the Republicans.

Simcha Felder of New York’s 17th state senate district ran as a Democrat in 2012 so that he could challenge the Republican incumbent in the general election instead of in a Republican primary. And, immediately after winning the general election, he announced that he would caucus with the Republicans.

He was criticized for “betraying” his voters, since he campaigned as a Democrat. But Democrats were in the minority in the New York senate at the time, and Felder thought there was more power in caucusing with the majority.

“My first priority is doing what’s best for the 17th district,” Felder said in a statement in 2012. “That means working with a Senate Majority committed to bringing economic and tax relief to the communities I represent, demonstrating compassion for the poor and respect for the middle class, and a commitment to improving public education and easing the burden on tuition-paying parents.”

As a result, Felder got to chair the Cities committee and the NYC Education subcommittee. Minority party members cannot chair a committee, but he was caucusing with the majority.

Special elections in April changed the balance. Now 32 of the 63 state senators are Democrats, and 31 are Republicans. If Felder caucused with his own party – like almost all elected officials do – then Democrats would have control of the state senate, committees would be chaired by Democrats, and committees would have Democratic majorities.

But Felder said in April that he wouldn’t switch to caucus with the Democrats, and cited changes in “committee structure” as a reason.

“I believe it is my obligation to prevent an unprecedented and uncertain late session political battle that will only hurt my constituents and New Yorkers,” he said. “Political gamesmanship must not be allowed to jeopardize the leadership, committee structure and staff of the New York State Senate and push this institution into turmoil.”

So the minority party kept its power in the senate.

To be sure, there are other reasons GENDA was defeated, like gerrymandering that has kept the state senate evenly split despite New York being a blue state and Republicans’ solid opposition to LGBTQ equality.

But Felder was put in a decisive role in April when he saw 31 of his colleagues were Democrats and 31 were Republicans, and if he cared about Democratic values like equality he could have caucused with the party his constituents voted for.

Felder’s support for the Republican Party was a necessary – although not sufficient – condition for defeating GENDA.

If Democrats pick up more seats in the November elections, though, GENDA will have a better chance of passing.