The Prince William Board of County Supervisors voted unanimously on Tuesday to appoint an independent, bipartisan panel to look at why many voters waited hours on Election Day to cast their ballot.

The panel would also make recommendations about how the county can avoid such problems in the future.

The Nov. 6 lines were the worst at the River Oaks precinct at Potomac Middle School, in a Democratic-leaning, minority district, where voters waited in some cases more than four hours to vote. The last vote there was cast at 10:45 p.m., and election officials acknowledged that the biggest problem was lack of voting machines.

There were also waiting times of between two and three hours at four other precincts, said Supervisor Frank J. Principi (D-Woodbridge).

“When we get it wrong, shame on us, and we got it wrong on Election Day,” said Principi, who recommended the formation of the commission.

Democrats have cried foul and complained to the Department of Justice. The three-member Electoral Board is comprised of two Republicans and one Democrat. (The relative numbers are determined by which party controls the governor’s mansion.) Local parties recommend who should serve on the commission and the local Circuit Court appoints the members.

Principi has said that the county’s problems extend beyond the Electoral Board. He says he is unsure whether a request for $350,000 for election expenses was squashed by county staff.

The request -- which would not have provided new voting machines but could have provided additional staffing -- comes up in Electoral Board meeting minutes and in e-mails between county staff and Registrar Betty Weimer.

Weimer told the board that she could not recall asking for the money but said she would look into it. Election officials say they were provided with all funds requested from the county.

Tony Guiffre, a member of the Electoral Board, said the board erred by not foreseeing the need for new machines. The board bought six new machines for two new precincts as a result of redistricting but did not buy any new machines for existing precincts despite projected population growth.

Weimer and Electoral Board members said in an interview that officials had planned to move forward with buying new machines after the election, given that Prince William was still within the state-mandated ratio of one machine for every 750 voters. In hindsight, they said that was a mistake and said that the state minimum is not good enough.

In Arlington County, for instance, there are many more machines — one for every 200 voters. That is the same ratio required in Maryland.

“We should have foreseen we needed more voting machines,” Guiffre said. “We really feel bad about it.”

As required by state law, the county will move toward buying machines that print paper records. Prince William and other Virginia localities 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.

The board will decide the new commission’s make-up -- and who will be appointed -- in the coming weeks, looking to ensure that a report is delivered before the next election, said county spokesman Jason Grant.

The formation of an independent panel echoed a move made on the same day by the Fairfax County Board of Supervisors. In Fairfax, complaints about Election Day voting lines were similar to those made in Prince William.

As in Prince William, the Fairfax County Democratic Committee has alleged that waiting times were longer in heavily Democratic precincts and that some of the poll workers it supplied were prevented from serving.

Fairfax Democrats also sued the county and state the week before the election over what they called an illegal attempt by Republicans to restrict party elections observers.

Corinne Reilly contributed to this report.