MARTINEZ (CBS SF) — A former California Highway Patrol officer has avoided jail time for forwarding himself sexually explicit photos from phones owned by female DUI suspects.

Prosecutor Barry Grove said Sean Harrington pleaded no contest to the two felony counts against him and was ordered to three years probation. He originally faced up to three years and eight months in prison.

READ MORE: Cyclist Struck By Driver In South San Jose Last Year Succumbs To Injuries

Grove said Harrington must attend a class on Community Violence Solutions where he must speak at the class. He will not face any jail time unless he violates probation.

Harrington previously admitted to investigators that stealing cellphone images from female suspects and forwarding the photos to himself and other colleagues in the Dublin CHP office.

READ MORE: UPDATE: Police Shoot, Kill Armed Suspect Outside San Francisco Airport International Terminal; Bullet Hits Bystander

Harrington forwarded about half a dozen nude or semi-nude photos from the cellphones of two different young women in police custody in August, according to search warrant records.

He said it is a “game” among officers and he learned of it while working in the CHP’s Los Angeles office.

WATCH: Harrington Gives First Public Statement Outside Of Court

MORE NEWS: San Francisco Officials Crack Down On Illegal, Pop-Up COVID Testing Sites