BAKERSFIELD, Calif. (KGET) — A Kern County jury hung on felony charges filed against a man accused of engaging in sex acts with a teen girl.

A mistrial was declared Friday on the felony counts and the jury found Jesus Herrera guilty of a misdemeanor count of annoying a child under 18, according to court records. The case is set for retrial next month.

Prosecutors said Herrera in 2017 engaged in “felony lewd conduct” with a 13-year-old girl, and, two years later, attempted to have sex with her, according to a release from the Kern County Public Defender’s Office.

At trial, Deputy Public Defenders Nick Roth and Samantha Sark presented evidence Herrera’s confession was coerced, according to the release. He admitted to the crimes after an “intense” three-hour interrogation that occurred in the middle of the night, the attorneys said.

The public defenders also pointed to inconsistencies and inaccuracies in the alleged victim’s testimony, the release said.

Jurors deliberated a week before declaring they were deadlocked. The votes on the three charges were 8-4, 9-3 and 9-3, with the majority favoring acquittal, according to the release. Herrera faced more than 16 years in prison if convicted.

“The long, honest, and thoughtful deliberation of the jury underscores their profound commitment to justice,” Roth said in the release.