A hotly contested Virginia House race has a winner — Republican incumbent David Yancey.

Democrat Shelly Simonds was declared the winner by one vote until a judge pronounced the race a tie. Being a tie, the names of each candidate were placed into individual film cases, placed into a bowl and one name was selected at random.

Republicans will fully control Virginia’s House of Delegates after an incumbent GOP member won a drawing Thursday to decide a tied election — and potentially the fate of Medicaid expansion in the state.

The state elections board chairman pulled a film canister out of a ceramic bowl containing the name of Republican David Yancey, giving him the victory over Democrat Shelly Simonds. Each received 11,608 votes in the race for a Newport News-based seat in the Virginia legislature’s lower chamber.

Yancey’s victory will give the GOP a 51-49 advantage in the House of Delegates. Democrats staged an unexpectedly strong performance in the November election, winning 15 seats and nearly erasing the GOP’s 66-34 majority.

Thursday’s drawing came after a three-judge panel refused to hear Simonds’ arguments over a single contested ballot. While an initial recount gave Simonds a one-vote lead, Yancey’s lawyers successfully argued a discarded ballot should have been counted as a vote for the Republican.

The drawing will likely have major implications for Democratic Gov.-elect Ralph Northam’s agenda. Northam is trying to complete Gov. Terry McAuliffe’s long push to expand Medicaid in the state, and now will have to work with a GOP-controlled chamber to do so. Northam has signaled a willingness to work with the GOP on Medicaid expansion, to the dismay of some progressive groups.