LOS ANGELES (CBSLA.com) — A former Miramonte Elementary School teacher accused of lewd acts on more than 20 former students Friday pleaded no contest to nearly two dozen charges.

READ MORE: Lakers Handle Celtics 117-102, Split Rivalry For Season

Mark Berndt, 62, had previously pleaded not guilty to 23 counts of lewd acts on a child for crimes he allegedly committed between 2005 and 2010.

He is accused of taking photos of students while they were bound and gagged in his classroom. Some photos show cockroaches being placed on students’ faces, while others show them being spoon-fed a milky-white substance that tested positive for Berndt’s DNA.

Berndt, who was arrested in January 2012, was sentenced to 25 years in prison, according to the Los Angeles Daily News.

The agreement was reportedly reached in order to keep his alleged victims from testifying.

READ MORE: Retired Judge To Investigate Claims Riverside County Failed To Protect Turpin Children After They Were Freed

“Mr. Berndt, I just want you to know, is not a monster. He’s not an evil person. Mistakes were made, but be very clear about this and the judge agreed and the D.A. agreed as well, at no time was there any credible evidence whatsoever that Mr. Berndt, inappropriately or in a sexual manner, touched any of those children,” attorney Manny Medrano said following the hearing.

LAUSD Superintendent John Deasy released the following statement on Berndt’s plea bargain:

“While the school district was not a party to the prosecutor’s plea deal with Mr. Berndt, we are relieved that the students and families will be able to put this part of the proceedings behind them. As a community of educators, we remain tireless advocates for student safety. 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.

“We hope that we can reach a resolution with the students and families who have yet to settle in an expeditious and respectful manner that will allow them to continue to heal and move forward. I speak for myself, Board President—Dr. Richard Vladovic—and the entire board when I pledge the school district’s continued support to the students and families impacted by the incidents at Miramonte.”

MORE NEWS: Family Mourn Teenager Shot And Killed Near Boyle Heights Recreation Center