NEWPORT NEWS, Va. (AP) — A court has now declared a tie in a Virginia legislative election that one day earlier appeared to have gone to a Democrat by a single vote, the latest dramatic twist in a contest likely to decide control of the state House.

A three-judge panel certified the 94th District in Newport News as tied at 11,608 to 11,608 on Wednesday, a day after a recount appeared to give Democrat Shelly Simonds the victory over Del. David Yancey.

By state law, the winner of the tie will be determined “by lot.” It was not immediately clear how or when that will take place.

Yancey successfully challenged an uncounted ballot that he said should have been included in his total.

His attorneys said the campaign believes one ballot meant for him was not counted. They cited concerns raised by a GOP election official who participated in the recount.

The official, Kenneth Mallory, wrote that the ballot had both candidates’ names bubbled in for the 94th District race. He says the voter had chosen Republican candidates in every other race.

“Simonds’ bubble had an additional slash mark through it,” the letter said.

Simonds, a school board member, had initially appeared to lose November’s election by 10 votes.

The outcome likely will decide partisan control of the House of Delegates. If Yancey wins, Republicans will hold on to power by one seat, 51-49. If Simonds wins, a rare power-sharing agreement would have to be brokered between Democrats and Republicans.

Democrats rode a tidal wave powered by unhappiness with GOP President Donald Trump in last month’s elections to erase Republicans’ 66-34 advantage

Tuesday’s recount was one of four scheduled for House races with extremely tight margins. The 94th District had by far the slimmest vote difference and the biggest chance of flipping.

Last week, Republican Del. Tim Hugo held on to his seat in Fairfax County after a recount had little impact on his 100-plus vote lead.

Two more recounts are set Wednesday and Thursday. The Democratic challenger leads by 336 votes in the 68th House District in and around Richmond, where ballot counting begins Wednesday.

Ballots will be recounted Thursday in the Fredericksburg area’s 28th District. The Republican candidate there leads by 82 votes. But Democrats already have asked a judge to call for a new election after at least 147 ballots were found to be assigned to the wrong districts.

If Democrats and Republicans end up evenly split, the parties may have to compromise just to elect a speaker and assign committee chairmanships. The parties reached a power-sharing agreement when Virginia’s House was last evenly divided 20 years ago. But if no agreement can be reached, prolonged chaos could ensue.