The North Carolina General Assembly gaveled out its legislative session in the wee hours of Wednesday morning, bringing an end to eight months of work. Like most of the recent sessions in Raleigh, it was a wild one, including a budget bill that arrived 76 days late. But conservative legislators managed to squeeze in a little last-minute excitement Tuesday with a controversial bill that would have stripped local governments of several key powers.

Under the bill, city governments couldn’t have passed higher minimum-wage laws, established affordable-housing mandates, or instituted rules about landlord-tenant relations—and any existing ordnances would have been superseded. It appears the bill would have have superseded and blocked any rules against discrimination on the basis of sexual orientation—sweeping restrictions on local authority that certainly seem at odds with the traditional Republican preference for local control. The last-minute legislation set off a wild scramble to figure out what was in the bill, what it meant, and whether it would pass. The bill was eventually set aside.

How did such a sweeping and controversial idea sneak through to the end of the session without getting any attention? Easily: As it turns out, the provisions only became public on Tuesday, and they weren’t in the bills that passed both houses of the legislature. Instead, they were added during conference committee, inserted into a drastically rewritten version of a bill designed to regulate the licensing of professional counselors. As The News & Observer drily noted, “Neither chamber’s original versions had any provisions regarding substantial changes to local government powers.”

Democrats, a beleaguered minority in the general assembly, managed to stop the bill by sending it to the legislature’s rules committee, which voted it down—though even members of that committee seemed confused about where that left things.

The strange spectacle of Republicans trying to roll back local control makes a bit more sense in context. For years, Democrats mostly controlled both the statehouse and the governorship. But Republicans captured the legislature in 2010, and the governor’s mansion two years later. Ever since, they’ve been busily passing a series of very conservative measures, some of which I explained here. The rightward shift inspired a prolonged series of protests in Raleigh and other major cities called “Moral Mondays.”

The large demonstrations, combined with their general impotence to stop the legislature—internecine GOP struggles, and not public opposition, have generally killed the most controversial measures—illuminate what’s going on. Rural-urban divides are a fixture of American politics, and they’re a particularly powerful force in North Carolina right now. Its urban centers tend to be far more liberal, while the rest of the state is far more conservative. The liberals can gather large, impassioned crowds to rally against conservative moves, but they don’t have the numbers (so far) to elect a majority in the state legislature—especially after post-2010 redistricting that made the map more favorable for Republicans. (Barack Obama narrowly won the state in 2008 but lost it in 2012.)

Despairing of Raleigh, progressives have often pursued their priorities at the local level. That’s exactly what the state bill was intended to stop. When Congress does this to state and municipal governments, it’s known as preemption—it’s a bedrock constitutional principle that federal laws trump state laws. With a Democrat in the White House, though, there are limits to what the Republican Congress can pass. But the GOP has been gaining seats at the state level for years, and now controls most state legislatures. Cities often tilt left, even in very red states, but conservative state governments around the country have begun passing laws that preempt municipal legislation. Last year, for example, Matt Valentine chronicled how state governments are overturning much stricter gun laws passed by cities with preemption laws.

Another measure this session would have forced city governments to seek approval from the state Board of Transportation before installing any bike lanes. Cities like Raleigh and Durham have been working to expand bike-lane mileage, and they noted that new lanes already required approval from engineers at the Department of Transportation. The proposal was later dropped.

North Carolina Republicans have passed a passel of measures they say are necessary to make the state more business-friendly. “We don’t want to have a patchwork of laws in North Carolina with regard to how businesses do what they do,” said Senator Chad Barefoot, an author of Tuesday’s preemption measure. “It makes it clear that North Carolina’s going to have a uniform system of commerce.”

In other words, it’s a classic case for big-government uniformity. Faced with these bills, Democrats in turn tend to make a strikingly conservative argument: Local people know best, and they ought to have the right to make their own rules about how they live, as long as it isn’t negatively affecting their neighbors.

“It’s an unwarranted intrusion on local authority,” a commissioner in Wake County, home of Raleigh, wrote in an email Tuesday, as reported by the N&O. “The word outrageous barely covers how truly disgusting this kind of ‘government’ is.”

For now, he and other local officials can relax: The general assembly is gone and probably won’t be back in session until late April. The rural-urban divide, and resulting preemption pushes like this, aren’t going away in North Carolina or elsewhere.