Ayres, 77, had been charged with nine counts of lewd and lascivious acts on a child under 14.
Judge Beth Freeman declared a mistrial July 27 after announcing the jury was hopelessly deadlocked in the highly publicized case.
The jury was split 11 to one on four of the counts. On the other five counts, the votes ranged from 10 to two to seven to five, according to Deputy District Attorney Melissa McKowan, who prosecuted the case.
After extensive discussions with the victims and their families, investigators from the San Mateo Police Department, and most of the jurors in the first trial, District Attorney James P. Fox determined that it is appropriate that the case proceeds to a second trial.
Chief Deputy District Attorney Steve Wagstaffe said today that the most significant factor in the decision was McKowan's discussions with the jurors and "their views that the evidence was strong and warrants conviction."
Wagstaffe also said the near unanimous decision on most of the counts "convinced us we were on the right path."
At the next court appearance for the case, scheduled for Aug. 28, Deputy District Attorney Melissa McKowan will advise the court that the district attorney's office is prepared to retry the case.
Ayres, who was president of the American Academy of Child and Adolescent Psychiatry from 1993 to 1995, would face up to life in prison if convicted.
After the mistrial was declared, Ayres' defense attorney Doron Weinberg said he and his client were relieved the jury didn't convict Ayres, but disappointed that he wasn't acquitted.
The trial focused largely on physical exams Ayres conducted on his patients. The six alleged victims testified the doctor groped them, and while Ayres admitted to performing physical exams in which the boys were naked from the waist down, he testified that nothing inappropriate happened.
Ayres is free on $750,000 bail.
The trial is expected to last for several weeks.