IT NOW appears, based on unofficial results, that Democrat Mark R. Herring slipped by Republican Mark D. Obenshain in their race for attorney general of Virginia by a gossamer margin, amounting to several thousandths of 1 percent of the 2.2 million votes cast. Or not. After all, the tally of votes has shifted every day, and sometimes more than once a day, since the election Nov. 5.

There’s a chance it may change again. What’s critical is that the election be settled by voters, ballots and the state elections board, not by the legislature or courts.

That appears to be a risk, if Republican grumbling is to be believed. GOP lawyers are suggesting that they may challenge some provisional ballots that were painstakingly vetted by Fairfax County over the past few days, in many cases based on interviews with the voters themselves.

It was partly on the strength of those provisional ballots that Mr. Herring arrived at his current lead of 164 votes . Fairfax, by far the most populous and vote-rich jurisdiction in Virginia, gave voters until 1 p.m. Tuesday to appear in person if they wanted to argue that their provisional ballots should be counted.

That was four days more than other jurisdictions allowed; they cut off counting provisional ballots Friday. But the extension was authorized under Virginia law, and Fairfax sensibly argued that its size and the number of ballots warranted the extra time for review.

As it happened, Mr. Herring won most of the provisional ballots that were approved in Fairfax, just as Democrats won a majority of all votes cast in the county. Hence the Republican threats.

The main reason so many provisional ballots were cast this year in Fairfax (493) is that many federal employees who were deployed overseas, including diplomats and military personnel, automatically received absentee ballots for the 2012 presidential election. The absentee ballots were good for two years, meaning that if those voters moved back to Virginia this year without notifying election officials of their move, they would have been eligible to cast only provisional ballots if they showed up to vote at the polls. In many cases, those provisional ballots were ultimately counted.

The worst-case scenario is that the race will be settled neither by the current canvassing of votes nor by the official recount that is likely to take place at the end of this month. Under Virginia law, the losing candidate may contest the outcome by appealing to the General Assembly, where Republicans hold the advantage. The rules of such an appeal are sketchy. Ultimately, it’s even possible the dispute could end up in federal court.

Those scenarios would be a disaster. Elections are for voters to decide — not lawmakers or judges. For the good of the state, the candidates and the parties should refrain from endless partisan combat and agree to let things be settled by the official recount.