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: Richmond Police K-9 Helps Detain, Disarm Machete-Wielding Suspect Threatening Family

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: Business Owners in San Francisco's Hayes Valley Say Crime Driving Them to Closure

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: Condemnation of the Unvaxxed Grows as Bay Area Mask Mandates Reappear