An official of the Virginia State Board of Elections pulled the name of David Yancey from a blue and white stoneware bowl on Thursday, breaking a tied race that is pivotal to control of the state House of Delegates.

The outcome in favor of Mr. Yancey, the Republican incumbent, means that the House remains narrowly in his party’s hands, 51 seats to 49, after a Democratic wave in November propelled by anger at President Trump. Going into the election, the Republicans had a 32-seat advantage.

The random drawing, a species of political unicorn that attracted attention well beyond Virginia, was conducted in the Patrick Henry Building near the State Capitol in Richmond shortly after 11 a.m. Each candidate’s name was written on strips of paper, inserted into film canisters and mixed together in the handmade bowl, made by the potter-in-residence at the Virginia Museum of Fine Arts, Steven Glass.

Despite the high ceremony, the drawing may not bring finality to a race that has already been fiercely fought through a recount and in court skirmishes. By state law, the loser in the drawing may request a second recount.