BAKERSFIELD, Calif. (KGET) — A former Kern County detentions deputy will have to register as a sex offender after pleading no contest Wednesday to sending sexually explicit messages to a high school student.

Under the terms of the plea agreement, Miguel Saldana must also perform 720 hours of community service and serve six months in jail, attorneys confirmed during a hearing before Judge Judith K. Dulcich. Sentencing is set for Aug. 13.

Charges of contacting a minor to commit a sexual offense and annoying or molesting a child were dismissed during the hearing. Saldana is no longer a detentions deputy.

Saldana, 23 at the time, was a volunteer assistant football coach at Wasco High School when he sent the messages to the student in 2018, court documents say. The student reported the messages to school administrators, and sheriff’s investigators learned Saldana asked for sexual favors from the student through Snapchat, according to the documents.