North Carolina's governor on Wednesday signed a controversial bill blocking cities from allowing transgender individuals to use public bathrooms for the sex they identify as -- as well as restricting cities from passing nondiscrimination laws more broadly, via CNN.

HB 2, which passed in a special session, would set a statewide anti-discrimination policy, banning employers and businesses from discriminating against employees or customers based on their race, color, country of origin, religion, age or “biological sex.” The bill offers no protections for lesbian, gay, bisexual and transgender people, and prevents local governments from passing any nondiscrimination policy that goes beyond the statewide standard.

Pat McCrory, a Republican, signed the bill Wednesday night and tweeted, "Ordinance defied common sense, allowing men to use women's bathroom/locker room for instance. That's why I signed bipartisan bill to stop it."

The move enraged civil liberties groups and Democrats in the state. The bill passed the state House 82-26 and the state Senate 32-0, with Senate Democrats walking out and not voting in protest.