LOS ANGELES (AP) — A once-respected former teacher accused of committing lewd acts on children in what authorities said he called "tasting games" pleaded no contest Friday as victims' family members tearfully told him he had ruined their lives.

Mark Berndt entered the legal equivalent of guilty pleas to 23 counts of committing lewd acts on children. Under a plea deal, the former teacher at Miramonte Elementary School in Los Angeles was immediately sentenced to 25 years in prison.

Superior Court Judge George Lomeli said it was the equivalent of a life sentence for the 62-year-old defendant.

Prosecutors have said in Berndt's "tasting games" he fed students his semen on cookies and by spoon, sometimes blindfolding and photographing them.

Before the sentencing, a parade of sobbing mothers denounced Berndt, saying he had ruined their lives and the lives of their daughters.

The women were not named in court. All but one spoke in Spanish with the aid of interpreters.

Some said they could not understand how the school district did not know about the incidents. Others added that their daughters could no longer eat cookies or anything sweet unless they knew their mothers had baked the items.

The mothers also spoke of girls who are now unable to socialize and lock themselves in their bedrooms.

Defense attorney Manny Medrano said Berndt is remorseful and apologetic, and that he had chosen to enter his plea to avoid causing pain to the children during a trial.

"The last thing Mr. Berndt wanted was to see 23 child witnesses have to walk through this gate to the witness stand," Medrano said, noting that his client would serve 19 1/2 years in prison due to time served and current statutes.

Berndt, his hands shackled and wearing an orange jail uniform, stared straight ahead and showed no reaction to the comments by the mothers.

He spoke only to acknowledge he understood the plea arrangement.

John Manly, an attorney who represents 30 of Berndt's students in civil cases, called the plea agreement a victory for his clients.

Story continues

"He's going to jail essentially for the rest of his life," Manly said. "You can't ask for more than that."

LAUSD Superintendent John Deasey issued a statement saying school district officials were relieved that the criminal case was over.

"We will continue to implement reforms and push for statewide changes to protect students, including calling for a strong teacher dismissal bill that will enable us to remove teachers who violate the public's trust and hurt students," Deasey said.

He expressed hope that remaining lawsuits will be settled soon.

Sean Rossall, a district spokesman, said 63 lawsuits filed on behalf of students have been settled for a total of $29.5 million, and 71 others are pending.

Berndt, who taught for 32 years at the South Los Angeles school, was removed in 2011.

The allegations against him came to light when a drugstore photo technician noticed dozens of odd photos of blindfolded third-graders and reported them to authorities. Investigators said they discovered a plastic spoon in Berndt's classroom trash bin. Tests found traces of semen on it.

The case led to a wide-ranging overhaul of how the nation's second-largest school district handles allegations of sexual abuse after it was revealed that previous complaints about Berndt's behavior were ignored.

Shortly after Berndt's arrest, the school district temporarily removed all 76 of the school's teachers, along with staff and administrators, putting them on leave and having them report to an empty high school nearby.

Six months later, when the new school year began, 43 of them returned to a restructured Miramonte with a new principal. The rest either retired or went to new schools. None was accused of any wrongdoing.

Another Miramonte teacher, Martin Springer, is charged with lewd acts on a child in a case involving a second-grader who authorities said was fondled in class in 2009. Springer is awaiting trial.