DURHAM, N.C.—It’s been two weeks since Election Day, which means that in 49 states, residents know who their governor will be next year. North Carolinians, however, are still waiting to see.

At the end of balloting on November 8, Democrat Roy Cooper, the current state attorney general, had a lead of a few thousand votes over Governor Pat McCrory, a Republican. Cooper promptly declared victory, but McCrory has not conceded the race, and the state has not been able to declare a winner. On Monday, Cooper announced a transition team, while McCrory accused him of “circumventing the electoral process.” Cooper’s lead fluctuated throughout the day on Tuesday as more counties returned their final canvass, but as of writing it was a little more than 6,000 votes out of roughly 4,700,000. (The most up-to-date results are here.)

It’s an unusually acrimonious race, but it follows an unusually acrimonious few years in North Carolina politics. The mention of an obscure state law that could theoretically allow the Republican-dominated state legislature to declare a winner in the race has set off something of a frenzy at the national level. It’s unclear whether there’s really much likelihood that the General Assembly would invoke the law and step in, although it would represent a breathtaking attempt to seize power.

The stakes are high in part because North Carolina has been through a series of significant political shifts over the last few years. After decades in which Democrats mostly dominated state politics, the GOP won control of the General Assembly in 2010 and then of the governor’s mansion two years later, with McCrory’s election. Republicans embarked on an aggressive program of conservative reforms. The most nationally noticed of those was HB 2, the so-called bathroom bill that, among other things, required transgender people to use bathrooms corresponding to the sex on their birth certificates. McCrory’s deficit appears to be in part a result of backlash to that law, and the economic repercussions for the state, which saw businesses cancel expansions, entertainers boycott concerts, and sports tournaments abandon the state.

But the battle over the results of the election is more directly tied to—and really ought to be seen as simply the latest battle in—a long war over voting rights. In 2013, as soon as the Supreme Court struck down several provisions of the Voting Rights Act, North Carolina Republicans passed a new law regulating voting in the state. Among other things, the law required voters to show a photo ID when voting, ended same-day registration, and shortened the early-voting period. The North Carolina law was described by some analysts as the most sweeping in the nation, but it fits with a wave of such laws that have been passed or proposed in states around the nation, mostly by conservative politicians who argue they’re necessary to safeguard the sanctity of elections. But there is very little evidence of widespread voter fraud, and less evidence that such measures prevent what fraud there is.

A coalition of groups, including the North Carolina NAACP and the Department of Justice, sued the state over the law, and after losing at the district court level, scored a resounding victory at the Fourth Circuit Court of Appeals, which struck down most of the law, finding that it was specifically intended to suppress the votes of minority voters who vote overwhelming Democratic. That meant voting in November was conducted—for the most part—under the pre-2013 laws.

Now McCrory and his allies are challenging the tally in the election, suggesting that fraud is responsible for Cooper’s advantage. In essence, the battle over the McCrory-Cooper race is another major battle in that campaign. If Cooper wins, it will put a Democrat in the governor’s mansion—albeit still with strong Republican majorities in the legislature—and slow the conservative revolution. But if McCrory can somehow come back and win, it would not only preserve those conservative changes but also offer an opportunity to prove that fraud is real.

One of the more readily apparent problems with the McCrory team’s claims of widespread fraud is that several other statewide Republican candidates won solid victories, including Donald Trump, Senator Richard Burr, and Lieutenant Governor Dan Forest. But McCrory and his allies have several avenues to try to win him reelection. Here’s a quick rundown.

Formal Protests and Challenges: Republicans have tried to argue that there are examples of problems with balloting around the state. In one case, a McCrory ally requested a recount in Durham County, a Democratic stronghold where votes came in particularly late on election night; some Republicans took this as evidence of chicanery. But the county’s Republican-led board of elections rejected that request. (All county boards of election across the state have a 2-1 majority in favor of the party of the sitting governor.)

McCrory and the state GOP have also brought up various cases where they argue that other ballots were improperly cast—for example, by felons who should not have been allowed to vote, or by people who died after casting absentee ballots but before election day, or by people who voted more than once. In total, McCrory’s team mounted challenges to votes in more than half of the state’s counties. But it’s not clear that McCrory would build a lead, even if every one of those challenges were granted. During a long state Board of Elections meeting today, Democratic and Republican lawyers sparred over how best to proceed on those challenges.

Meanwhile, the state Board of Elections added some 1,500 provisional votes to the final tally as the result of a lawsuit from liberal groups that complained that the state DMV had failed to pass voter registration data to the Board in a timely fashion.

A Lawsuit Over Same-Day Registration: Separately, the Civitas Institute Monday evening filed a lawsuit seeking a restraining order against counting ballots cast through same-day registration this year. The Civitas Institute is largely funded by Art Pope, a conservative businessman who spent heavily to produce Republican victories and served as McCrory’s first budget director. When voters register and vote on the same day in North Carolina, they are required to show proof of address, which can be either a photo ID or some other document. The government also sends a letter to the address they provide to ensure it is valid.

Civitas’s suit argues that same-day votes should not be counted until this process can be completed, because the lack of verification lends itself to fraud. It is true that a higher number of same-day registrations fail the test than standard registrations, but the number is still very small—less than 2.5 percent. Advocates for same-day registration argue that even that number is misleading, and that many of the rejected registrations are rejected simply because the voters have moved. The suit covers more than 90,000 votes, and Civitas argues that based on the past statistics, that means some 3,000 votes invalid votes could be counted. That’s still less than Cooper’s lead at the moment, and so discarding these wouldn’t on its own change the outcome, even if they all favored his opponent.(Same-day voters broke roughly equally among registered Democrats, Republicans, and unaffiliated voters, so this might not help McCrory that much.) In any case, the challenge is notable because it seeks to exclude voters from the tally once the election is over and votes have been cast.

Recount: Tuesday afternoon, the McCrory campaign formally requested a recount of the race. A candidate’s request for a recount must be granted if the margin of the race is less than 10,000 votes, and while it’s possible that the final canvass will put Cooper’s lead above that mark, it is not the case right now, meaning the recount will likely move forward.

“With serious concerns of potential voter fraud emerging across the state, it is becoming more apparent that a thorough recount is one way the people of North Carolina can have confidence in the results, process and system,” McCrory wrote.

Democrats scoff at McCrory’s request, arguing that a recount won’t save him. A spokesman for Cooper called it a “last-ditch effort to delay and deny the results of the election,” adding, “We are confident that a recount will do nothing to change the fact that Roy Cooper has won this election.”

It is true that the margin of victory, while well within the bounds of a statutory request, seems hard to overcome. There have been several notable recounts in recent memory nationwide, including the 2000 Florida presidential vote, the 2004 Washington state gubernatorial contest, and the 2008 U.S. Senate race in Minnesota. But those races’s tallies before recounts came in the hundreds or even tens of votes, not thousands. For McCrory to succeed, a large county would probably have to find a cache of thousands of votes that were uncounted or improperly counted, which is unlikely but not impossible.

A Legislative Intervention: Finally, there’s been a great deal of national attention given to the possibility that the General Assembly could intervene and hand the election to McCrory. State law says that in a contested election, the legislature should either determine who won the most votes or, if unable to do that, call a new election. The law further says that decision is not reviewable by state courts. Slate wrote that McCrory’s “real goal appears to be to delegitimize the results to such an extent that the state legislature—which holds a Republican supermajority—can step in and select him as the winner.”

In an interview with The News and Observer, state House Speaker Tim Moore, a Republican, didn’t rule the assembly taking the election out, but he didn’t sound enthused about it either: “The media has certainly covered the constitutional provision that gives the General Assembly the authority to weigh in on that, but given that the elections are not finalized at this point, I think further comment would be premature.”

In an excellent and useful column, Peter St. Onge of The Charlotte Observer explains some of the back story of the law, which was created after a particularly unusual case in which thousands of votes were lost due to a malfunctioning machine. Crucially, as St. Onge points out, a General Assembly decision might not be reviewable by state courts, but it certainly would be reviewable by federal courts, and as election-law expert Rick Hasen of the University of California-Irvine writes, attempting to coronate McCrory for a second term in the face of results that showed a Cooper victory could violate constitutional due-process and equal-protection guarantees. Hasen writes: “A brazen power grab without a plausible basis for overturning the results of a democratically conducted election? I expect the federal courts would take a very close look at such a thing.”

The concept of an effective coup has some strong historical resonances in North Carolina, where, in Wilmington in 1898, white supremacists toppled the local government in the only successful armed coup in U.S. history. Still, for all the uncertainty of the gubernatorial race, the Old North State has a long way to go—including the final canvass, the likely recount, and the resolution of the Civitas suit—before the General Assembly comes into the picture.