Control of Virginia’s House of Delegates, pictured during a January 2016 address by Gov. Terry McAuliffe (D), is in doubt as Democrats challenge voting irregularities. (Steve Helber/AP)

It has all the elements of a political whodunit, even if the "who" part is no mystery. Nearly everyone agrees: The registrar did it.

But why she moved 83 voters from one Virginia House of Delegates district to another, no one seems to know. Former Fredericksburg registrar Juanita Pitchford cannot say. She died in April.

But the adjustments she made in the 28th and 88th districts live on, throwing two House seats and control of the entire chamber into highly litigated limbo nearly three weeks after Election Day.

Adding to the drama are a few uncanny twists. Precisely 83 voters were initially said to have been moved out of a district won by a margin of 82 votes, although after a few days’ investigation, election officials said they had uncovered hundreds of misassigned voters between the two districts. They say 147 of them voted in the wrong district.

Perhaps adding to the confusion: The 28th and the 88th races each had a candidate with the last name Cole, one a Democrat, the other a Republican.

“It’s like a Wes Anderson movie about elections,” said Brian Cannon, executive director of the nonpartisan redistricting group One­Virginia2021. “The whole thing is just crazy coincidences.”

Said Senate Minority Leader Richard L. Saslaw (D-Fairfax): “This whole election reminds me of the old Abbott and Costello routine: ‘Who’s on first?’ Nobody knows what’s going on.”

It would all be one big knee-slapper if the stakes weren’t so high. Control of the state’s lower chamber hangs in the balance.

Republicans boasted a 66-to-34 majority going into this month’s elections. Now the count is 49 Democrats and 51 Republicans, including the two uncertified ­races. If those two delegates are not seated, the parties would be tied at 49 apiece.

Voter confidence could be especially tested if a losing candidate files a challenge with the state legislature, with the winner decided by a House vote, observers say.

The latest stories and details on the 2017 Virginia general election and race for governor.

Voters who turned out in historic numbers for an off-year election could be turned off if contests end up decided by the House of Delegates, now controlled by Republicans, or a judge, said Cameron Glenn Sasnett, Fairfax County’s general registrar.

“We have this election with phenomenal turnout. And we have people that participated for the first time in a gubernatorial election that are going to now have whatever decision was made by the voters potentially being overturned or challenged or questioned,” Sasnett said. “I think that will impact voter psyches when they go to vote again.”

An election challenge in the legislature would be a rare but not unprecedented means of settling a Virginia General Assembly race.

Democrats and their allies have filed three lawsuits to try to block the State Board of Elections from certifying the 28th and 88th District races. Two of the suits were promptly dismissed. In the third case, a federal judge rejected Democrats’ request for a temporary restraining order to block the state board from certifying the 28th District election when it meets Monday. But he left open the possibility of a special election.

At that hearing in federal court, state officials said, they had discovered a total of 384 misassigned voters between the two House districts. But over the weekend, state elections officials indicated that 147 of the misassigned voters cast ballots.

Elections officials said the trouble began on Charles Street, in a heavily Democratic precinct where in 2016, 68 percent voters went for Hillary Clinton and 27 percent went for President Trump.

The whole street should be in the 28th District. But for some reason, voters living in odd-
numbered houses were reassigned to the 88th — an error affecting 83 registered voters. Elections Commissioner Edgardo Cortés disclosed the problem at a public meeting last Monday, saying Pitchford reassigned them in April 2016. He was at a loss to explain why.

There has been some pushback on the rogue registrar theory, with several people suggesting Pitchford could not have acted alone. Her daughter, Aliya Wong, said the registrar had plenty of supervision.

“Blaming my mother seems entirely based on the word of Commissioner Edgardo Cortés,” she wrote in a letter to the editor submitted to The Washington Post. “Why are these ‘errors’ just coming to light now? We know that dead (wo)men tell no tales, but apparently, they make great scapegoats.”

Sasnett, the Fairfax registrar, vouched for Pitchford’s professionalism at last week’s State Board of Elections meeting, saying he found it too convenient to lay the problem at the feet of someone who cannot speak for herself.

The assignment errors would affect both races, but the focus has been on the 28th because it is a squeaker — one of three tight races that are likely headed for recounts and could tip the balance of power in the House after a wave of Democratic wins.

In the 28th, Republican Robert Thomas leads Democrat Joshua Cole by 82 votes in the contest to fill the seat being vacated by retiring Speaker William J. Howell (R-Stafford).

In the 88th District, Del. Mark Cole (R-Fredericksburg) — no relation to Joshua Cole — beat Democrat Steve Aycock by more than 4,000 votes. But if Mark Cole’s race remains uncertified, and he is not seated when the legislature convenes in January, Democrats could use the vacancy to help them gain control of a chamber that the GOP has long dominated.

Democrats could take power if recounts produce a win in two other close races. Del. Timothy D. Hugo (R-Fairfax) has a 106-vote lead over Democrat Donte Tanner, while Del. David E. Yancey (R-Newport News) is up just 10 votes over Democrat Shelly Simonds.

A losing candidate could contest the results in the House, something Saslaw, one of Virginia’s longest-serving legislators, recalls happening just once before.

In 1979, Republican Meyera Oberndorf challenged her loss in a Senate race, which she blamed on malfunctioning voting machines. With the Senate under Democratic control, she got nowhere.

Magda Jean-Louis contributed to this report.