LONG BEACH (CBSLA) – A former Hermosa Beach police officer was arrested on accusations that he attempted to meet who he thought was a 16-year-old girl for sex, but in fact was an undercover deputy.

Todd Lewitt, 51, of Long Beach was charged Wednesday with one felony count of meeting a minor for lewd purposes, the Los Angeles County District Attorney’s Office reports.

On July 26, Lewitt contacted an undercover L.A. County Sheriff’s deputy posing as a 16-year-old girl on a dating website. He arranged to meet the girl that same day in East Los Angeles with the purpose of having sex.

He was arrested when he arrived for the meeting, the DA’s office said.

According to the Daily Breeze, Lewitt served as a Hermosa Beach police officer from about 2004 to 2016, when he resigned. At some point during his service, he was fired following an FBI investigation into excessive use of force. However, he filed a personnel lawsuit and was reinstated onto the force in 2008, the Daily Breeze reports.

If convicted as charged, Lewitt faces a maximum of four years in prison. He is schedule to be arraigned Thursday in L.A. County Superior Court. Prosecutors are recommending his bail be set at $75,000.