The longest and costliest preliminary hearing in California history ended last week when all seven defendants in the McMartin Preschool case were ordered to stand trial on 135 counts of child molestation and conspiracy.

Handing down her decision after a 17-month hearing, Municipal Judge Aviva K. Bobb said, "It appears to me that the offenses have been committed."

Defendant Virginia McMartin, 78, the wheelchair-bound founder of the school in Manhattan Beach, likened the hearing to a "Nazi prison camp" and complained that "the DA came in here and lied and lied."

Bobb ordered some charges dropped but added dozens more based on the testimony of 14 children. Virginia McMartin was ordered to stand trial on one count of conspiracy, while her grandson, Raymond Buckey, 27, faces the greatest number of charges: 81 counts of molestation and one of conspiracy. Each of the other defendants, all McMartin teachers, is charged with one count of conspiracy and several counts of molestation. They are:

*Peggy McMartin Buckey, 59, McMartin's daughter and Raymond's mother. She faces a total of 24 counts.

*Peggy Ann Buckey, 29, McMartin's granddaughter and Raymond's sister, eight counts.

*Betty Raidor, 66, 10 counts.

*Mary Ann Jackson, 59, six counts.

*Babette Spitler, 37, four counts.

Raymond Buckey and his mother have been jailed since the hearing began, and the remaining defendants are free on bail.

Authorities said the preliminary hearing cost Los Angeles County $4 million, including investigations by the sheriff's department and district attorney, prosecution and court costs.

Most of the defendants said they have lost their life savings and their homes. The property on which the shuttered school stands now belongs to Raymond Buckey's attorney, Daniel Davis.

The case, which turned a national spotlight on incidents involving sexual abuse of children, began in August 1983, when the mother of a 2-year-old boy complained to police that her child, a pupil at the school, had been molested.

In March 1984, a Los Angeles County grand jury indicted the seven McMartin teachers on 109 counts charging rape, sodomy, oral copulation and fondling of about 100 children over a 10-year period.

The hearing dragged for months as attorneys wrangled over such issues as whether the children would be allowed to testify over closed-circuit television. Finally, last January, the first child climbed into the witness stand.

Fourteen children testified, telling of "games" their teachers called "naked movie star." What they said, when their childish words had been translated into adult language, was that they had been raped, sodomized and fondled.

They said they had been forced to watch while small animals were slaughtered. They were told, they said, that the same thing would happen to them and to their parents if they ever told of the molestations. Small animals' bones were found in a lot adjacent to the school, but no evidence has tied them to the children's stories.

Defense attorneys have said the children's stories are fantasies planted in their minds by therapists. Mental-health professionals countered that the only way to coax a child to reveal molestations is to ask "leading questions." Deputy District Attorney Lael Rubin conceded therapists asked such questions but said the charges are not based on those sessions.

Pediatricians testified they found physical evidence of molestation in the children.

Yesterday, the district attorney's office announced that Deputy District Attorneys Glenn Stevens and Christine Johnston have been removed from the case. A spokesman declined to say why they were removed, but said Rubin will handle the trial, United Press International reported.

The defendants are to be arraigned in Superior Court on Jan. 23.