Updated on December 21, 2017, at 9:52 a.m.

After winning the Virginia governor’s race and flipping more than a dozen seats in the House of Delegates from red to blue last month, Democrats are hoping for one more reason to celebrate—but it’ll come down to a random draw.

On Tuesday, a recount initially appeared to show Democrat Shelly Simonds defeating Republican incumbent David Yancey by a single vote—11,608 to 11,607. That would have cost Republicans their majority in the House of Delegates, creating a tie for control of the lower chamber of the state legislature.

But in an unexpected turn of events, a judicial panel awarded an additional vote to Yancey on Wednesday, producing a tie. The decision will first have to be certified by the state’s board of elections, and then both candidates will have to decide whether to pursue further legal appeals. Virginia law stipulates that the state board of elections will draw lots to determine who wins in the event of a tie.

On Thursday, Virginia officials announced that on December 27, they will randomly select the winner of the race by drawing an old film canister, which will have a slip of paper with the candidate’s name inside, from a bowl. The loser of the draw can still request another recount.

If Simonds ultimately prevails, the result has the power to fundamentally reshape the political power structure in the state when Democratic Governor-elect Ralph Northam starts his term in January. Democrats will have more leverage to push for liberal priorities, with Medicaid expansion expected to be at the top of the list. It would be yet another blow for a Republican Party reeling from recent losses in Virginia and Alabama.

Virginia has long been labeled a swing state, but the recent election results may indicate that the state is becoming more favorable for Democrats. “I think Virginia is essentially a blue-ish state now. I don’t think it’s purple-ish, I think it’s blue-ish,” said Quentin Kidd, the director of the Wason Center for Public Policy at Christopher Newport University.

It’s likely that Democrats made gains in the House of Delegates because liberal voters are energized to make a statement in the Trump era. Democratic candidates have consistently outperformed expectations in special elections in 2017, pointing to a surge in enthusiasm among Democrats. And while Democrats had been expected to win some seats in the House of Delegates, their recent 16-seat gain has stunned political observers.

A key question is how much of the recent Democratic success is due to Trump. In 2012, Chris Cillizza had Virginia on his list of nine swing states where that year’s presidential election “will be decided.” In 2016, Politico identified Virginia as a swing state in the presidential race and FiveThirtyEight included Virginia on its list of “purple states.”

Some political commentators, however, have argued that the time has come to stop calling Virginia a swing state. “Virginia over the past few decades has transitioned from solid red to blue,” conservative columnist Jennifer Rubin argued in The Washington Post in June.

Virginia has voted for Democrats at the presidential level in the last three elections and in the last two governor’s races. Currently, the state’s Senate delegation is made up of only Democrats. Under the Obama administration, though, the Democratic Party had a mixed record of victory and defeat. In 2009, Republican Bob McDonnell defeated Democrat Creigh Deeds in the governor's race, but Democrats went on to win every statewide race during the Obama years after that. In 2011, however, Democrats lost the Virginia Senate, and Republicans continued to have an edge in the upper legislative chamber. Over the course of Obama’s presidency, Democrats also lost a total of 11 seats in the House of Delegates.

“Virginia is trending blue, no doubt about that,” said Mark Rozell, dean of the Schar School of Policy and Government at George Mason University. “But we should keep in mind that in another off-off year cycle, 2019, Republicans may take back some of the seats they lost in this year’s local elections.”

Another question is whether the Democratic Party’s gains in the Virginia House of Delegates are a precursor to Democratic victory in the upcoming midterm elections where the fate of the House of Representatives will be at stake. Election analysts have described Virginia’s state legislative races in 2017 as a bellwether of next year’s midterms.

Geoffrey Skelley of the University of Virginia’s Center for Politics notes, however, that in the recent elections, “Virginia Democrats mostly won seats that Clinton carried.” If that dynamic plays out in the midterms, it will not be sufficient for Democrats to win back the House of Representatives. That’s because Democrats need to flip at least 24 seats and there are only 23 seats currently held by Republicans that Clinton won in the last presidential election. “Perhaps the one certain takeaway for Democrats should be to run everywhere,” Skelley said. “There were a few other seats that Trump won in Virginia where Democratic candidates got pretty close to pulling off upsets.”

There are still two other Virginia House of Delegates races up for a recount, and in one instance, Democrats are pressing for an election redo, creating a remote possibility that Democrats could still gain an outright majority in the House of Delegates. If the House remains at a tie, Democrats and Republicans will have to implement power-sharing, a practice that took place in the 1990s. The two parties would have the ability to negotiate how the arrangement will work. It’s not yet clear exactly how Democrats and Republicans will divide power in the upcoming legislative session if the House of Delegates remains split.

A divided House of Delegates could lead to gridlock, but it gives Democrats a far greater chance than they would have had otherwise to push a liberal agenda, which is likely to include efforts to expand Medicaid, raise the minimum wage, and potentially strengthen gun control measures.  

“This is potentially huge for the incoming governor and the Democratic Party agenda in the state,” Rozell said. “To anyone who ever questioned whether his or her vote matters, we might just see one vote in one legislative race influence the direction of public policy in the Commonwealth for the next four years.”