DURHAM, N.C.—The North Carolina General Assembly called lawmakers back to Raleigh on Wednesday for a special session. The reason wasn’t a pressing budget crisis, a natural disaster, or court-mandated redistricting. (That happened last month.)

Instead, legislators returned to the state house to overrule a local ordinance in Charlotte banning discrimination against LGBT people. A bill written for that purpose passed Wednesday evening and was signed by Governor Pat McCrory, a Republican. In the House, every Republican and 11 Democrats backed the bill. In the Senate, Democrats walked out when a vote was called, resulting in a 32-0 passage by Republicans. The law not only overturns Charlotte’s ban: It also prevents any local governments from passing their own non-discrimination ordinances, mandates that students in the state’s schools use bathrooms corresponding to the gender on their birth certificate, and prevents cities from enacting minimum wages higher than the state’s.

The push by Republican leaders is the latest front in a battle in the Old North State between liberal-leaning cities and more conservative areas of the state, and it’s also the latest front in a national battle over LGBT rights.

Charlotte’s updated ordinance was passed in February, after a contentious process. Existing rules prevented businesses from discriminating against customers based on race, age, religion, and gender, and the new ones added gay, lesbian, or transgender customers to the list. The most controversial provision allows transgender people to use the bathroom corresponding to the gender with which they identify. Such provisions are not uncommon—many major cities, as well as smaller ones, have them on the books.

Almost immediately, Republicans in the state legislature vowed to overturn the law, even though the assembly is not in session. North Carolina has become a fierce battleground for culture war issues. Since the GOP captured the legislature in 2010 and the governorship in 2012, there’s been a steady stream of conservative changes, from much stricter voter laws to looser gun laws to overhauling taxes. The legislature even considered a proposal to establish Christianity as the official state religion.

The state is deeply divided between liberal cities and conservative rural areas, and with few prospects to take back control in Raleigh, progressives have looked to local government as a way to enact change. The general assembly has not looked kindly on those efforts. In September, just as the legislative calendar was ending, lawmakers heard a bill that would prevent cities from passing higher minimum-wage laws, establishing affordable-housing mandates, or instituting rules about landlord-tenant relations. It would also have likely banned any LGBT-discrimination bans. Another failed bill would have required state approval for cities wishing to create new bike lanes.

Although the push to preempt city laws failed as the clock ran out, Charlotte’s new ordinance created a new impetus. McCrory, a former mayor of Charlotte, opposed the law but declined to call a special session, so on Monday lawmakers did so themselves. On Wednesday, members who could make it in time traipsed back to Raleigh to overturn the Charlotte rule. (Some missed the session, saying they did not have time to travel.) What exactly would be in the bill remained a mystery almost up to the moment the session gaveled in—the text was made public just minutes ahead of time.

Once released, it was clear that the legislative language was more sweeping than expected. Not only does it prevent local governments from writing ordinances that allow people to use the bathroom corresponding to the gender with with they identify, it also preempts cities from passing their own nondiscrimination standards, saying the state’s rules—which are more conservative—supersede localities. Local school district would be barred from allowing transgender students to use bathrooms or locker rooms that don’t correspond to the gender listed on their birth certificate. The bill would also ban cities from passing their own minimum-wage laws.

It’s a striking example of how North Carolina’s Republicans have decided that culture-war issues ought to take precedence over traditional conservative preference for local control. But they also pit the North Carolina GOP’s professed desire to improve the business climate in the state against social conservative impulses. Representative Paul Stam, a sponsor of the bill, called it a commerce bill, but many large corporations have stated their opposition to this law and others, concerned that they could interfere with business or hiring.

There were just 30 minutes allocated for public comment in the House during the session. (Committee members only got five minutes to read the bill before voting, though.) There was further time for comment in the Senate.

Since the U.S. Supreme Court made same-sex marriage the law of the land in June 2015, the new front in LGBT rights concerns non-discrimination laws. In one especially noted example, a non-discrimination proposal in Houston was defeated in November, in large part because of controversy over transgender use of bathrooms. The laws pit advocates who say that the laws create ostracism and danger for a transgender population already subject to threats and violence against opponents who maintain that allowing transgender individuals to use the bathroom with which they identify endangers privacy or creates a threat of sexual assault. (Experiences in places with transgender accommodation suggest there’s little risk of sexual assault.)

Two states have passed laws that preempt local non-discrimination provisions. In 2011, Tennessee passed such a law, and Arkansas passed one in 2015—both in responses to cities adopting or considering ordinances, noted Cathryn Oakley, a senior legislative counsel at the Human Rights Campaign, which opposes the laws.

Bills that mandate that students use the bathroom corresponding to their “biological sex” or some similar phrase—tied to what a birth certificate says in the North Carolina case—are more common, but none has entered law. In February, South Dakota lawmakers passed a similar bill, but Republican Governor Dennis Daugaard vetoed it, saying the law did not answer any pressing need and that local authorities were better-equipped to handle the issue than state lawmakers. The student-restroom laws raise other questions, such as how schools might seek to enforce then, and whether enforcement would make schools fall afoul of federal Title IX regulation and thus endanger federal funding. (It would be somewhat ironic if the state’s attempt to preempt cities was itself preempted by federal law.)

The law could have far-reaching implications both statewide and nationally. North Carolina cities will see local ordinances and minimum-wage laws rolled back and have to adjust. There are likely to be legal challenges. The law will be an issue in this year’s gubernatorial election, in which McCrory is set to face Attorney General Roy Cooper, a Democrat who called the bill “shameful.” And as perhaps the first law of its kind in the nation, it will create a template for other conservative legislatures to pursue. That’s unfortunate, suggested Robin Wilson, a law professor at the University of Illinois who helped broker a compromise on a Utah religious-liberty law between LGBT activists and conservative advocates. “For the state to just come behind and wipe that clean without thinking about commonsense solutions—I [don’t] think that’s the point we want to come to,” she said.