RICHMOND, Va. (AP) _ As part of a statewide recount in Virginia's disputed attorney general election, a three-judge panel on Monday ordered a more rigorous, manual recount of ballots in nine precincts.

Optical scan ballots _ paper ballots read by machine _ will be examined by hand in those nine precincts because of apparent equipment problems, the Circuit Court panel ruled.

The recount begins Tuesday and is expected to be finished Wednesday. The manual count was ordered in eight precincts in Gloucester County and one in Lynchburg.

The State Board of Elections has certified Republican Bob McDonnell the winner by just 323 votes out of more than 1.9 million cast statewide in the Nov. 8 election _ a margin of 0.0166 of a percentage point. It was the closest statewide election in modern Virginia history.

Democrat Creigh Deeds demanded a recount, allowed by Virginia law when results fall within 1 percentage point. The court last week rejected Deeds' request to rerun all optical scan ballots through vote tabulators.

On Monday, the court focused on the Gloucester and Lynchburg precincts. Machines in Gloucester failed to process 79 ballots, and 244 ballots in Lynchburg were not read by the machines because votes were marked with the wrong type of pen.

As a result, all the ballots run through those machines _ more than 6,500 in Gloucester and more than 1,300 in Lynchburg _ will be manually recounted.

``I'm encouraged that some votes are going to be counted,'' Deeds said after a nearly 3 1/2-hour hearing. ``I'm a little perplexed that all the votes can't be recounted.''

McDonnell's attorney, William Hurd, said the judges were wise to limit the manual recount to the most troublesome precincts.

``The more the ballots are handled, the more risk there is of human error,'' he said.