The race for attorney general in Virginia is so close, it's almost certain to head to a recount. So how would that work? (The Washington Post)

Fairfax County election officials said Friday that they believe nearly 2,000 votes went uncounted after Tuesday’s elections, a technical error that could affect the outcome of the still unresolved race for Virginia attorney general.

The error stemmed from problems with a broken machine at the county’s Mason district voting center, officials said.

The machine, known as an optical scanner, recorded 723 votes on election night before it broke down, election officials said. Its memory card was then placed in a working machine, which recorded 2,688 votes.

But that tally was not included in the statement of election results delivered by the Mason voting center to the county election board. Instead, officials received a statement that reported the 723 votes from the broken machine.

Election officials believe that the larger total includes the 723 votes, which could mean adding 1,965 votes to the outcome, said Seth T. Stark, chairman of the three-member electoral board.

But with Democrats looking for more votes, Republicans trying to protect the interests of their candidate and volunteers exhausted after three days of auditing totals, the board held off on making a change to the tally, officials said.

The extra votes, which come from an area that leans heavily in favor of Democrats, could affect the outcome of the attorney general’s race, which appears headed for a recount. As of Friday afternoon, state Sen. Mark D. Obenshain (R-Harrisonburg) was leading state Sen. Mark R. Herring (D-Loudoun) by 1,272 votes, or about 0.06 percent of the 2.2 million votes cast, according to the State Board of Elections’ Web site.

The margin changed slightly after officials in Bedford County, near Roanoke, said Friday that they had also discovered missing votes.

Barbara Gunter, Bedford’s general registrar, said 732 votes were overlooked in the preliminary results because of human error or technical problems. After canvassing the totals, the county reported Friday that Obenshain had received 581 additional votes and that Herring had received an additional 150 votes.

With auditing continuing elsewhere in the state, totals in all statewide elections are likely to fluctuate slightly before they are certified Nov. 25, said Nikki Sheridan, a state election board spokeswoman. Local election board certifications must be completed by Tuesday, Sheridan said.

In Fairfax, officials are scheduled to reconvene at 10 a.m. Saturday, when the three-member election board expects to decide how to deal with the discrepancy, said Brian Schoeneman, a board member. The board is made up of two Republicans and one Democrat, who are appointed by the Circuit Court.

“We want to give staff time enough to confirm it, and be able to present that to us in an orderly fashion that makes sense,” Schoeneman said. “And the best way to do that is to come back fresh in the morning, with fresh eyes.”

Both sides in the race for attorney general expressed confidence that they would prevail and said several more ups and downs were to be expected before the outcome is known.

“There are a lot more things that are going to happen here,” said Kevin O’Holleran, a Herring spokesman, who was at the County Government Center to monitor the canvassing.

No one from Obenshain’s campaign was at the government center. But other Republican officials were there as volunteers studied ballot machine statements and matched them with recorded tallies in each election.

The possibility of an error in the vote totals was first raised by the political team of Rep. Gerald E. Connolly (D-Va.).

The state election board’s site shows absentee ballots cast in each county, with a breakdown by congressional district. Fairfax County includes parts of three congressional districts: Connolly’s 11th; the 10th, which is represented by Frank R. Wolf (R); and the 8th, represented by James P. Moran (D).

According to state numbers, Fairfax reported a surprisingly low number of absentee ballots cast in the 8th District, compared with the other two congressional districts.

In the 10th District, 88 percent of voters who requested a ballot also voted, and 86 percent did so in the 11th District. But in the 8th District, only 50 percent of those who requested ballots — 4,168 out of 8,363 — appeared to have cast ballots, a response rate not only lower than in other parts of Fairfax County but also lower than in any other congressional district in the state, according to the Connolly team.

Volunteers who were investigating that discrepancy Friday learned of the broader problem involving the broken Mason district machine, officials said.

Fredrick Kunkle contributed to this report.