BAKERSFIELD, Calif. (KGET) — Moments before trial was set to begin, prosecutors dropped all charges against a former Shafter code enforcement officer who was accused of inappropriately touching teen girls while volunteering as a youth wrestling coach.

Matthew Cain Maldonado faced five misdemeanor counts of annoying or molesting a child before the case was dismissed Thursday morning.

Charges were filed last year after three girls –ages 17, 15, and 12 — said he touched them inappropriately at practices held in the garage of Shafter High School’s girls wrestling coach. Maldonado told investigators he was illustrating wrestling maneuvers and no improper touching occurred.

His attorney, Jared M. Thompson of Humphrey & Thompson, said three other teens made “demonstrably false” similar accusations against his client for sexual conduct they claimed occurred a decade ago when he was their youth pastor at a church in Wasco.

A judge on Wednesday ruled the prior accusers — whom prosecutors had called as witnesses — could not testify.

The District Attorney’s Office said in a news release the judge did not find the prior alleged victims’ statements false, but excluded the evidence on other grounds.

Context from the previous accusers was necessary to establish Maldonado’s guilt beyond a reasonable doubt, prosecutors said, and overcome claims of accident or incidental contact.

“Stripped of the ability to present the prior victims’ testimony, the people could not proceed on the case as there was not a reasonable chance of establishing the proof beyond a reasonable doubt required for conviction,” according to the release. “The court’s ruling was disappointing, and ultimately by prohibiting the admission of relevant evidence in exactly the type of case that prior evidence is important for, the court effectively usurped the role of the jury and ensured that a conviction could not occur.”

Thompson said he arrived at court Thursday prepared to give his opening statement when the prosecutor dismissed the case.

“He was overjoyed,” Thompson said of Maldonado’s reaction. “He started to cry.”

Maldonado’s wife, parents and friends from church were in the audience. They’ve stood by him throughout this ordeal, the attorney said.

“This type of case highlights the danger in our society, especially at this point in time, of blindly accepting any female’s accusations,” Thompson said, referring to situations like this as an unintended consequence of the #MeToo movement.

In this case, he said, the teens misconstrued wrestling maneuvers as inappropriate. And the prior accusers flat-out lied, he said.

One of the earlier accusers was overheard by a juror outside the courtroom saying she was prepared to claim Maldonado touched her children, Thompson said. That accuser had no children at the time she said the abuse occurred, he said.

“Luckily, we were prepared to and able to show the falsity of these prior accusations,” Thompson said.

Maldonado worked for the city three years before resigning in late 2021.