People wait in line to vote at Caroline High School on November 6, 2012 in Milford, Virginia. (Mark Wilson/Getty Images)

In the District, there were technical glitches with equipment at polling places. In Montgomery County, budget constraints led to about 1,000 fewer election judges than during the previous presidential election.

But there’s no question about it: Some precincts in Northern Virginia held the dubious distinction of having the most brutally long lines for voters in the Washington region on Tuesday.

In Prince William and Fairfax counties, hundreds waited for more than three hours — and long after polls were scheduled to close at 7 p.m. The problems were blamed on high voter turnout, unusually long ballots, a shortage of poll workers and a limited number of touch-screen machines.

“It was outrageous,” said Rep. Gerry Connolly (D-Va.), who tried unsuccessfully to get additional machines delivered to a Dumfries voting location. The lines, he said, were “guaranteed to discourage a lot of voters who just can’t wait.”

In comparison, reports of lengthy wait times in the District and Maryland were isolated and far shorter.

Both the District and Maryland appeared to get some relief Tuesday because of robust early voting programs. Unlike in Virginia, voters in the District and Maryland are not required to provide identification. And in Maryland, state law requires local election officials to offer voters significantly more electronic voting machines than in Virginia, where in 2007 the General Assembly passed a law to phase out the machines.

In coming weeks, election officials in the area said they will analyze what went wrong on Tuesday. Wait times can be affected by a variety of factors, including the layout of polling places, the ineffectiveness of poll workers and the inefficiency of voters, say, digging through a purse to find an ID.

“If you have one bad poll worker checking people in, it can cause people problems,” said Thad Hall, a political science professor at the University of Utah, who observed voting in Maryland and Virginia.

Cameron Quinn, Fairfax County’s elections chief, said she had huge problems recruiting poll workers. When nearly 28,000 more people showed up to vote than in 2008, there were 250 fewer poll workers on hand. Quinn said the office is considering asking the General Assembly to approve a pilot program that would essentially draft poll workers similar to the jury duty process.

Election officials throughout Northern Virginia also attributed the long wait times to constraints on their ability to purchase new electronic machines. Local jurisdictions are generally prohibited from buying additional touch-screen machines because of a 2007 law intended to address concerns about machines that do not print paper records.

Localities that rely on electronic machines are required by law to operate at least one machine for every 750 registered voters. But the number of available machines varies. In Arlington County, for instance, there are many more machines — one for every 200 voters. That is the same ratio required in Maryland.

Concerns about the limited number of machines turned testy Tuesday at a precinct in Dumfries, with Democratic Party leaders accusing the Republican-led elections board of intentionally providing insufficient equipment in a predominantly minority precinct.

Richard Hendrix, of the Prince William County Electoral Board, said Tuesday that machines were distributed evenly throughout the county.

The six machines at the precinct for what Connolly said was a potential electorate of about 4,600 people were largely in line with state standards that the county elections chief said were followed.

In general, election observers cautioned that lengthy wait times may be the exception. Four years ago, one nationwide survey found that only 5 percent of voters waited over an hour to cast a ballot, according to Charles Stewart III, a political science professor at the Massachusetts Institute of Technology, who conducted the research. In contrast, about 70 percent voted in less than 10 minutes.

Jeremy Borden and Mike DeBonis contributed to this report.