LOS ANGELES, JULY 27 -- The nation's longest and costliest criminal case ended today with a prosecution decision to drop child molestation charges against former McMartin Pre-School teacher Raymond Buckey after the second jury to try him announced itself hopelessly deadlocked.

"How long can you keep this up? The evidence is not going to get any better," said deputy district attorney Joe Martinez in declaring an end to the 7-year-old case that cost taxpayers about $13.2 million. His announcement followed a mistrial declaration by Superior Court Judge Stanley Weisberg.

The case began with an August 1983 telephone call from the worried parent of a 2 1/2-year-old boy. It forced Buckey, 32, to spend five years in jail awaiting trial, brought charges -- later dropped -- against six other McMartin teachers, and affected molestation investigation techniques throughout the country.

Rick Dunham, an engineer who served as foreman of the jury in the second trial, said most jurors voted to declare Buckey not guilty on most counts largely because early videotaped interviews showed child abuse counselors leading alleged child victims into accusations of "Naked Movie Star" games and damaging charges. "The tapes in my mind were very bad," Dunham said, echoing comments made by several jurors in the first trial, which ended in January with not guilty verdicts on 52 counts and a deadlock on 13.

District Attorney Ira Reiner said he consulted with parents of the alleged victims and his prosecutors earlier in the week and had already decided to drop the charges if the jury deadlocked, as notes to the judge indicated was likely. Reiner said he was not sorry he put Buckey through two trials, but acknowledged "there were certain fundamental problems with the evidence going back six or seven years."

Buckey's reaction was subdued. "We are never going to get back the seven years that were taken from us," he said. He said he planned to move out of the state and "get some fresh air."

Jurors said they voted 8 to 4 to convict Buckey on one count, anal molestation of one girl, the only majority guilty vote on any count against him by either jury. On one other count the jury deadlocked.

Earlier in the day the jury recalled two not guilty verdicts it had decided and sealed days before and changed them to 11 to 1 for acquittal. Dunham said one juror, after reviewing testimony by a prosecution physician, decided genital scars on one girl were deep enough into the vagina to prove a crime.

One female juror called discussions of medical evidence during their three-week deliberation "excruciating." She said "we spend hours debating whether it is the vagina or the area around the vagina" that must be touched in a criminal molestation.

"I had a lot of problems with the medical evidence," said juror Lloyd Isaacson. One doctor, he said, testified about molestation scars but pediatricians who had given children physical examinations in the period they were allegedly molested "found nothing wrong."

The first trial, which lasted 33 months, involved charges of molestation of 11 children at the Manhattan Beach school, demolished earlier this year, by Buckey and his mother Peggy McMartin Buckey, who was acquitted. The second trial, which lasted less than 12 weeks, dealt with three alleged victims.

Assistant district attorney Pamela Ferrero said only one parent was willing to allow her child to testify at a third trial, and only if today's jury had been within one vote of conviction.