The state Senate barely defeated legislation that would have repealed the state's new gender-neutral bathroom policy.

Washington’s state Senate has killed a transphobic bill — but only by a hair.

Legislators voted 25-24 to defeat SB 6443. The bill would have repealed a new rule issued by the state's Human Rights Commission that allows transgender people to use public restrooms that correspond with their gender identity.

The bill’s defeat was greeted with a mixture of relief and concern among its opponents, who called out the “bigotry” behind its proposal.

“It's become so palpable to me the fear and pain this legislation is creating for so many people just trying to lead their private lives,” stated Rep. Brady Walkinshaw on Facebook. “The legislation is motivated by bigotry, politics, and a deep chasm of misunderstanding. My gratitude to the 26 of you who just voted to defeat the bathroom bill. I'm heartened to see it fail.”

"Transgender people aren't some nameless, faceless group,” added Sen. Marko Liias. “They are our friends and neighbors, our children and our parents. They face tremendous challenges fitting into our society, and we should work to welcome them — not exclude them."

Only one Democrat, Sen. Jim Hargrove, voted for the legislation. Three Republicans, Andy Hill, Joe Fain, and Steve Litzow, broke rank with their party to help defeat it.

"Legislation to create more uncertainty and reduce the rights of any minority does more to divide us than to bring equality," said Litzow, according to the Seattle Post-Intelligencer. "This provides our state with a powerful opportunity to educate more people about our transgender community members and the struggles and discrimination they already face."

However, state Rep. Matt Manweller has made it clear that this is not the end of the “bathroom bill” strategy.

It looks like the new "let men in womens bathroom" rule DOES apply to schools. Nice job Dems Repeal this rule now or we will see you in Nov! — Matt Manweller (@MManweller) January 6, 2016

Washington has become the latest battl ground where anti-LGBT legislators, faced with a post-marriage equality country, have turned to so-called bathroom bills and transphobic fearmongering to advance their agenda. Notably, this tactic worked to defeat the Houston Equal Rights Ordinance last November.