Since 2008, when Barack Obama defeated John McCain by a little more than fourteen thousand votes in North Carolina, the state's political scene has been closely divided. In 2010, Republicans took control of both houses of the state legislature for the first time in a century, and moved rapidly to redraw the state’s electoral districts, turning their narrow majority of votes into a deadlock on the legislature. After the G.O.P. won the governor’s office in 2012, they launched a wave of legislation to limit ballot access, restrict abortion rights, and open the state to fracking. A wave of weekly “Moral Mondays” protests, led by religious progressives, began in 2013, and more than a thousand people were peacefully arrested at the State Legislative Building, in Raleigh.

This year, the Democrats clawed back some ground. Donald Trump won 50.5 per cent of the vote, but Roy Cooper, the state's attorney general, defeated Governor Pat McCrory, a Republican, by fewer than five thousand votes. (McCrory pursued recounts through the state board of elections until December 5th, before conceding.) The gerrymandered map is so stable that the intense election season turned over only a single legislative district, a Senate seat that flipped to the Republicans. Meanwhile, Democrats narrowly held the attorney general’s office and liberals retook a one-vote majority in the State Supreme Court’s nonpartisan balloting.

It had been a tumultuous fall in the state. Just before the election, there were severe floods to the eastern coastal plain and wildfires to the mountain west. In early December, the lame-duck North Carolina General Assembly convened a special session to provide emergency relief. As soon as that session ended, on December 14th, the legislature’s Republican leaders gavelled in a new special session, with no announced agenda. Their plans soon became clear: payback for the narrow losses of November. In just under two days, Republicans passed bills rearranging the board of elections, weakening the governor’s power to appoint Cabinet members and other officials, and requiring judicial candidates to declare a partisan affiliation.

The lightning-quick legislation is a familiar tactic. Since 2013, North Carolina Republicans have worked this way, apparently to avoid confrontations with the liberal protest movement. Protesters, in turn, have become almost permanently mobilized. Last week, as word spread of the new special session, activists packed the State Legislative Building to capacity, singing and chanting even after the legislature shut the viewing galleries and proceeded unobserved. At least fifty-six people were arrested after refusing to leave. In a statement supporting the protests, the longtime Democratic congressman David Price, who represents Chapel Hill, accused Republican legislators of “undermining the will of the voters” and “dismantling our state’s democracy.” He warned, “American democracy may be more fragile than we realized.” North Carolina Republican chairman Rob Hayes shot back that the protesters were attempting to impose “mob rule.”

Under the previous board-of-elections law, the governor’s party held a majority on the state board and the hundred subsidiary county boards. The new boards will be evenly divided between the two major parties, although “the political party with the second-highest number of registered affiliates,” that is, the Republicans, will occupy the chair of the board in “even-numbered years,” that is, election years. The legislation doesn’t specify the duties of the chair, and the scheme is clearly intended to give Republicans an edge, but it is more evenhanded than the system it replaces. When McCrory challenged his narrow defeat in November, his appeals went to boards that Republicans controlled by virtue of his being in the governorship.

The legislation cuts back the number of politically appointed offices that the governor controls from fifteen hundred to four hundred and twenty-five. This is clearly a bid to entrench Republicans in a thousand and seventy-five offices that McCrory filled. It is also part of a long-running partisan battle. McCrory’s Democratic predecessor was authorized to fill only four hundred positions. A governor's scope of appointments has seesawed since 1985, when Democrats limited an incoming Republican to three hundred and twenty-five offices, and sweeping partisan firings in new Administrations go back much further.

The same bill requires the State Senate’s approval for the governor’s Cabinet appointments and strips him of the power to appoint members of the University of North Carolina’s board of governors. The state’s constitution provides for the Senate’s “advice and consent” to Cabinet positions and gives the legislature ultimate authority over the university’s board, but both changes abandon past practice in order to curtail Cooper’s power before he takes office. If the legislature gives Cooper’s Cabinet nominees an aggressive ideological vetting, it could delay governing or shift state policy to the right. The refusal to let Cooper shape the U.N.C system, which McCrory has filled with controversial conservatives, may have the most concrete effect.

This spate of legislation does not directly violate constitutional or democratic principles. It is political hardball, intended to maximize partisan advantage within the rules of the game, often by pressing or breaking norms. Observers may be reminded of Senate Majority Leader Mitch McConnell’s use of legislative tactics to hamstring Barack Obama’s Presidency. Some of this state-level hardball is, really, more peevish than Machiavellian. The shift to partisan State Supreme Court elections in the weeks after a liberal won a non-partisan race is hardly an obvious gain for Republicans, especially when Democrats have also just won the races for attorney general and governor.

The problem is deeper than these new laws. In the eyes of many of their opponents, North Carolina’s Republicans have lost the moral and constitutional authority to govern. A good deal of this is rooted in the racial character of the state’s partisan politics. The gerrymandering that followed the 2010 Republican takeover was so aggressive, packing black voters into as few districts as possible, that, in August, a federal court ruled that twenty-eight House and Senate districts were illegal and ordered them redrawn after the 2016 vote. Also in August, a federal appeals court invalidated most of a 2013 North Carolina voting law that targeted black voters by reducing early voting, eliminating same-day registration, and raising barriers to ballot access. The decision gave counties discretion in restoring early voting, and some Republican-controlled boards of elections offered small numbers of locations with limited times, at the encouragement of the state Republican Party.

North Carolina’s Republicans have also practiced an aggressive form of right-wing identity politics. In 2012, they promoted a constitutional amendment that banned same-sex marriage. The amendment passed, with considerable acrimony and bad feeling, but was invalidated in 2015 by the Supreme Court’s decision in Obergefell v. Hodges. Then, in a March, 2016, special session, the legislature passed the notorious “bathroom law,” which required individuals to use public bathrooms corresponding to their “biological gender.” It brought boycotts from businesses, entertainers, and athletic associations, and governor-elect Cooper made it a centerpiece of his campaign against McCrory. It was a law of remarkable mean-spiritedness, seemingly intended to produce moral panic around groundless fears of cross-dressing men following women into bathrooms and high-school boys invading girls’ locker rooms. On Monday, the Charlotte city council unexpectedly adopted a symbolic repeal of the transgender-rights ordinance that H.B. 2 overrode. In return, McCrory announced that he expects the legislature to repeal H.B. 2 in yet another special session. This one-sided compromise leaves trans people without legal protection while the state is freed from direct responsibility.