North Carolina Bans Local Anti-Discrimination Policies

North Carolina legislators, in a whirlwind special session on Wednesday, passed a wide-ranging bill barring transgender people from bathrooms and locker rooms that do not match the gender on their birth certificates.

Republicans unanimously supported the bill, while in the Senate, Democrats walked out in protest. “This is a direct affront to equality, civil rights and local autonomy,” the Senate Democratic leader, Dan Blue, said in a statement.

North Carolina’s governor, Pat McCrory, a Republican, signed the bill late Wednesday night.

The session, which was abruptly convened by Republican lawmakers on Tuesday, came in response to an antidiscrimination ordinance approved by the state’s largest city, Charlotte, last month. That ordinance provided protections based on sexual orientation, gender expression and gender identity, including letting transgender people use the public bathrooms that correspond with their gender identity, not gender at birth.

The state bill, put together so quickly that many lawmakers had not seen it before it was introduced Wednesday morning, specifically bars people in North Carolina from using bathrooms that do not match their birth gender, and goes further to prohibit municipalities from creating their own antidiscrimination policies. Instead, it creates a statewide antidiscrimination policy — one that does not mention gay and transgender people. The bill also prohibits local governments from raising minimum wage levels above the state level — something a number of cities in other states have done.

Whether to allow transgender people access to bathrooms based on gender identity has touched off a national debate, and actions in recent weeks had appeared to turn in favor of that access. Earlier this month, South Dakota’s Republican governor vetoed a bill banning access. A similar bill failed in Tennessee this week.

“North Carolina has gone against the trend,” said Sarah Preston, the executive director for the North Carolina office of the American Civil Liberties Union. “And they crafted a bill that was more extreme than others. They specifically left gays, lesbians and the transgender community out of the antidiscrimination policy. They want to make it plain that they think that kind of discrimination is O.K.”

Republicans stressed that the bill was passed not just to protect women and children from unwanted and potentially dangerous intrusions by biological males, but also to clarify legislative authority. On the House floor, Representative Dan Bishop, a Republican who sponsored the bill, described Charlotte’s decision to enact an antidiscrimination measure as an “egregious overreach.” With the state bill, he said, “What we are doing is preserving a sense of privacy people have long expected.”

Some large firms in the state, many having policies that allow transgender access to bathrooms by identity, opposed the new bill. Dow Chemical, a major employer in the state, called the bill an “attempt to undermine equality.”

In often emotional testimony on Wednesday before the bill was passed, those opposing transgender access described the issue as one of safety. Chloe Jefferson, a junior at Greenville Christian Academy, said letting biological males into women’s bathrooms would expose girls to sexual predators, adding, “Girls like me should never be made to shower and undress in front of boys.”

Madeleine Gause, a transgender woman who grew up in Hickory, where as a boy she was often bullied in the bathroom, told lawmakers that forcing transgender women to use the men’s room posed its own risks. “I can’t use the men’s room. I won’t go back. It is unsafe for me,” she said. “And it freaks people out when I go to the men’s room. Would you want to go to the men’s room with me?”

She added that the fears of sexual predators were overblown.

“People aren’t getting raped and murdered,” she said. “They are just going to the bathroom.”

A version of this article appears in print on , on Page A15 of the New York edition with the headline: North Carolina Limits Bathroom Use by Birth Gender. Order Reprints | Today’s Paper | Subscribe