A bizarre and razor-close Virginia House of Delegates election came to a close on Thursday after incumbent Republican David Yancey's name was pulled from an old film canister that was drawn out of a ceramic bowl, giving the GOP a crucial extra seat in the legislature.

Watch:

JUST IN: Virginia Board of Elections randomly chooses Republican David Yancey as winner of previously tied Virginia House of Delegates race pic.twitter.com/wKUvwZX4CG — NBC News (@NBCNews) January 4, 2018

The random drawing came after weeks of vote counting and appeals that ultimately resulted in a 11,608-11,608 tie between Yancey and his Democratic opponent, Shelly Simonds.

Buzzfeed's Tasneem Nashrulla, who sardonically described Thursday's drawing as "democracy in action," runs through the timeline:

SCROLL TO CONTINUE WITH CONTENT Never Miss a Beat. Get our best delivered to your inbox.





On Dec. 19, Simonds appeared to be the winner of the race after defeating Yancey by one vote.



On Dec. 20, after Yancey challenged a ballot he said went uncounted, a three-judge panel ruled that the single ballot was in fact a vote for him — making the race a TIE.



On Dec. 21, James Alcorn, the chairman of the Virginia State Board of Elections, announced that they would draw names to determine the winner of the race on Dec. 27.



However, the drawing was postponed after Simonds challenged the recount vote.



After consideration, the random draw was rescheduled for Jan. 4.



On Thursday, two slips of paper printed with the candidates' names were inserted into film canisters, which were sealed and then shuffled in a ceramic bowl made by a local artist from the Virginia Museum of Fine Arts.

The random result could have monumental consequences for Medicaid expansion in the state, as it gives Republicans a 51-49 advantage in the House of Delegates.

While newly elected Democratic Gov. Ralph Northam campaigned on the promise to expand Medicaid in Virginia, he appeared to qualify this promise in a December interview with the Washington Post, in which he suggested he would work with Republicans in "overhauling" Medicaid in an effort to "better defin[e] eligibility" and "control costs."

The comments were welcomed by Virginia Republicans, but quickly denounced by progressives, who interpreted Northam's nod toward bipartisanship as a needless compromise with the right.

Newly elected Virginia state delegate and democratic socialist Lee Carter was quick to respond to Northam's remarks, saying Medicaid expansion is "the bare minimum."

"A clean Medicaid expansion is the compromise. That's where I'm coming from, that's what I hope he'd be advocating for," Carter added. "I don't think his comments were indicative of that."