A woman steps over an icy puddle after casting her ballot in the special election for the District 6 seat of the Virginia Senate at the Onley, Va. polling site on Tuesday, Jan. 7. (Jay Diem/AP)

Control of the Virginia Senate hung by the narrowest of threads Tuesday night as a Democrat led by just 22 votes in a special election to fill the Hampton Roads seat of Lt. Gov.-elect Ralph S. Northam.

Del. Lynwood W. Lewis Jr. (D-Accomack) led Wayne Coleman (R), the owner of a Norfolk shipping company, by just 0.1 percent with all precincts reporting. That margin is well within the range for the loser to demand a recount paid for by local governments, although the numbers will first be subject to a canvass by local election boards before they are certified by the State Board of Elections.

The 40-member Senate has been evenly split between Democrats and Republicans, and Northam will serve as the tiebreaking vote for Democrats if it remains that way. But Northam’s victory and that of state Sen. Mark R. Herring (D-Loudoun) — who won the race for attorney general after a dramatic statewide recount — gave the GOP two chances to tip the balance.

Northam’s 6th District seat, which is centered in Norfolk and includes the Eastern Shore and a sliver of Virginia Beach, leans Democratic; President Obama won it with 57 percent of the vote in 2012. But turnout is typically low and notoriously hard to predict in special elections, particularly in Tuesday’s frigid weather. Just fewer than 20,000 voters turned out, roughly two-thirds the number that cast ballots when Northam won reelection in 2011.

If Northam’s seat remains Democratic, the focus would shift to the Jan. 21 special election in Herring’s district.

That race will feature a three-way contest between Jennifer Wexton (D), a Leesburg lawyer; John Whitbeck, chairman of the 10th Congressional District Republican Committee; and former delegate Joe T. May, who lost his reelection bid last year in the Republican primary and is now running for the state Senate as an independent.

Voters in Herring’s seat, which covers much of Loudoun County, backed Obama by a wide margin in 2012. But Loudoun is home to a corps of committed Republicans who tend to turn out more reliably than Democrats in non-presidential races.

Herring will resign from his Senate seat Saturday, the day he is sworn in as attorney general. That means Republicans will have a 20 to 19 advantage until Herring’s successor joins the chamber, presumably Jan. 22.

Roanoke voters also went to the polls Tuesday to fill the state House seat vacated by Del. Onzlee Ware (D), who resigned his seat because of poor health. Democrats held that seat, too, with businessman Sam Rasoul trouncing former Roanoke City Sheriff Octavia Johnson (R), 70 percent to 30 percent.

House Speaker William J. Howell (R-Stafford) poured more than $100,000 into Johnson’s campaign from his political action committee, Dominion Leadership Trust. But Johnson was not able to overcome the strong Democratic tilt of the district.

Rasoul’s win means the partisan breakdown of the House will remain 67 Republicans and 33 Democrats. Republicans control every other seat in Southwest Virginia.