Republican David Yancey and Democrat Shelly Simonds (Julia Rendleman/For The Washington Post)

Control of Virginia’s legislature hung in limbo Wednesday after a three-judge panel declined to certify the recount of a key House race, saying that a questionable ballot should be counted in favor of the Republican and tying a race that Democrats thought they had won by a single vote.

“The court declares there is no winner in this election,” Newport News Circuit Court Judge Bryant L. Sugg said after the panel deliberated for more than two hours.

He said that the ballot in question contained a mark for Democrat Shelly Simonds as well as a mark for Republican Del. David Yancey but that the voter had made another mark to strike out Sim­onds’s name.

Officials presiding over the five-hour recount on Tuesday had discarded that ballot en route to a historic reversal of the original election outcome. Yancey had emerged from Election Day with a 10-vote lead in the 94th District, but the recount uncovered enough additional ballots for Simonds to give her a one-vote victory.

That seemed to set up the House for a rare 50-50 split between Republicans and Democrats, ending 17 years of GOP dominance and making headlines nationwide.

This is the ballot that was scrutinized in the race for the Virginia House of Delegates 94th District in Newport News, Va. (City of Newport News, Virginia)

But Republicans challenged that decision in court Wednesday, saying the voter had selected every other Republican on the ballot and intended to vote for Yancey.

The judges — all of whom were elected by a Republican-
controlled legislature — agreed, leaving the race tied at 11,608 votes each for Yancey and Simonds. The balance of power in the House stands at 50-49 in favor of Republicans until the Newport News race can be resolved.

State law says the winner of a tied House race will be determined by lot — leaving the fate of the chamber to what is essentially a coin toss.

James Alcorn, chairman of the State Board of Elections, said the winner will be chosen by placing names on slips of paper into two film canisters and then drawing the canisters from a glass bowl (or his bowler hat). The drawing has been scheduled for Dec. 27 11 a.m. at the elections board in Richmond.

Complicating the tiebreaking vote is the need to ensure that both a Democratic and Republican representative of the three-member elections board will be available during the holidays.

“We were not planning to get together in the next week,” said Alcorn, a Democrat appointed by outgoing Gov. Terry McAuliffe (D).

Democrats are challenging the results of three races Republicans narrowly won on Nov. 7 in the state legislature. This is what you need to know. (Claritza Jimenez/The Washington Post)

But it doesn’t end there. If the loser of the coin toss is unhappy with that result, he or she can seek a second recount.

News of the court decision pulsed through political circles that, just a day before, had been roiled by the notion that Simonds had taken the seat from Yancey by a single vote in the recount.

As he was leaving the courthouse Wednesday, Yancey said “the ruling today makes certain every vote in this historic election was counted.”

The turnaround shocked Democrats, who on social media were still celebrating their unlikely rise to power in the House of Delegates. Before the Nov. 7 elections, Republicans outnumbered Democrats in that chamber by 66 to 34. The GOP has a smaller, 21-to-19 edge in the state Senate, where ties votes can be broken by a Democratic lieutenant governor. With Democrat Ralph Northam set to take over as governor on Jan. 13, the party is primed to flex its newfound muscle.

But the Newport News outcome now leaves things unclear. The House Democratic Caucus vowed to fight the judges’ decision, calling it “erroneous,” though some legal experts expressed skepticism that the party has avenues for a challenge.

“We are currently assessing all legal options before us as we fight for a just result,” said Marc Elias, the lawyer for the Democrats. “The Republicans themselves had affirmed that this result was accurate yesterday before changing their minds today.

“After conceding this seat and their majority, they are now desperately trying to claw both back ‘like a snarling dog that won’t let go of a bone,’ ” he said, quoting a recent editorial by the RichmondTimes-Dispatch.

But according to lawyers for Yancey, the questions about the recount’s lone disputed ballot were a late-breaking surprise to them, as well.

Kenneth Mallory, a paid election official chosen by the Yancey team, had spotted the ballot about halfway through the Tuesday recount. He said he thought the ballot clearly looked like a vote for Yancey, but the other official he was working with — selected by Democrats — disagreed.

“I felt hurried to move on and proceed. I was new to this process, and I was caught up by his argument,” Mallory wrote in a letter to the judges outlining his concerns.

The ballot was tossed aside as invalid, the precinct was wrapped up and the recount moved on. At the end of the day, Republican and Democratic officials alike stated that they were satisfied with the process and outcome.

But a volunteer observer working for Yancey — John Alvarado, who also happened to be Yancey’s campaign manager — had seen Mallory’s discomfort during the recount. State law limits the ability of observers to communicate with election officials during the recount, but afterward, Alvarado sounded the alarm with Yancey’s legal team, according to Republican lawyer Trevor Stanley.

Stanley reached out to Mallory Tuesday evening, but Mallory declined to talk until he got assurances from the city’s Electoral Board that he was allowed to do so, the lawyer said.

Mallory, meanwhile, said he had been agonizing about his failure to act during the recount. A middle school civics teacher, Mallory, 33, said in an interview that he had wanted to take part in the recount so he could talk about it with his students.

He wrote in his letter that he “lamented” his failure to act on the questionable ballot, and that he shared his misgivings with his wife and parents.

Finally, about 10 p.m. Tuesday, Yancey’s team talked with Mallory and heard his concerns. They urged him to write out his thoughts and sign them so they could take them to court in the morning, when the judges would convene to certify the results.

Once the judges read the letter and heard arguments from the lawyers, they spent two hours studying the ballot in question before ruling.

GOP leaders in the House of Delegates, who on Tuesday had conceded the recount and pledged to share power with Democrats in what they believed would be a chamber split 50 to 50, issued a new statement after Wednesday’s turn of events.

“While it appeared yesterday that Shelly Simonds was elected, it’s obvious now that the result will remain unclear for a while longer,” said a statement from House GOP leaders Kirk Cox, Tim Hugo and Nick Rush.

Simonds, who appeared on MSNBC’s “Morning Joe” Wednesday morning as the surprise victor of a tense recount that reset state politics, could not be reached for comment.

It is not clear whether a final decision in the Simonds-Yancey matchup will settle control of the House of Delegates.

Even as the court was considering whether to certify Tuesday’s recount in the 94th House District, two other recounts are taking place this week — at least one of which may further reshuffle politics in Richmond.

Election officials on Wednesday evening were finishing a recount in the 68th House District in Richmond, where Republican Del. G. Manoli Loupassi trailed Democratic challenger Dawn Adams by 336 votes, but the outcome appeared unlikely to change.

And a recount is set for Thursday in Fredericksburg’s District 28, where the Republican leads by 82 votes. Democrats have also challenged that race in federal court, where they are seeking a new election because more than 100 voters were mistakenly given ballots for the wrong legislative district.

House Democrats were meeting in Richmond on Wednesday night to elect their own leadership for the coming General Assembly session, which starts Jan. 10. They were set to vote on their designee for speaker but held off in light of the uncertainty in the Simonds-Yancey race and in District 28. Otherwise they reelected their current caucus leadership.

House Minority Leader David J. Toscano (Charlottesville) is vying with his party’s longest-serving member, Del. Kenneth R. Plum (Fairfax), for the speaker position.

After the court’s ruling threw the balance of power back toward Republicans, Plum said he thinks Democrats need to be realistic about what’s ahead.

“Irrespective of these last-minute backs and forths, it’s clear that the people are divided in their choice,” he said. “And I think what’s incumbent upon us is that we do a power-sharing arrangement [with Republicans] where we can get some work done.”