LOS ANGELES (AP) — A former Los Angeles elementary school teacher charged with blindfolding students and spoon-feeding them cookies laced with his semen has agreed to plead no contest to all charges, an attorney for some of the victims said Thursday.

Mark Berndt plans to enter the legal equivalent of guilty pleas to 23 charges at a hearing Friday, according to John Manly, an attorney who represents 30 Miramonte Elementary School students and their parents. Manly said he was notified of the plea by prosecutors.

The plea agreement, first reported by the Daily News of Los Angeles, calls for Berndt to be sentenced to 25 years in prison.

Manly called the agreement a victory for his clients and said they are grateful for being treated "with decency and dignity" by prosecutors.

"He's going to jail essentially for the rest of his life," he said of the 62-year-old Berndt. "You can't ask for more than that."

He said prosecutors urged a plea deal because "they were concerned about re-traumatizing the children at trial."

The district attorney's office and Berndt's lawyer declined to comment.

Berndt taught at the South Los Angeles school for more than 30 years. 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.

According to prosecutors, Berndt used the semen-coated cookies for "tasting games" with students. He was removed from the classroom in January 2011.

Berndt was fired and the Los Angeles Unified School District then paid him $40,000 to drop his appeal, which officials said was the most immediate way to ensure he wouldn't be a threat to other children. The move still brought heavy criticism.

Dozens of lawsuits and claims were filed on behalf of victims. Sean Rossall, a district spokesman, said 63 cases have been settled for a total of $29.5 million, and 71 are pending.

Story continues

He said the district has not seen the plea agreement and won't comment until it's approved by a judge.

"We're focused on the civil cases and settling them in a manner that is respectful of the health and educational needs of students and their families," he said.

The Miramonte 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. It also showed how slowly state officials act to censure teachers and led to a flurry of allegations of teacher-student sex abuse in the district and in other school systems.

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.

Manly denounced the district for allowing Berndt to continue teaching after there had been complaints about him in the 1990s.

"For all intents and purposes , this man murdered these children emotionally," he said, noting all of the children are in therapy. He said some have developed severe eating disorders as a result of the abuse with cookies.

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