A 61-year-old retired Los Angeles police officer was sentenced Thursday to five years of formal probation for possessing child pornography, and was ordered to register as a sex offender for life.

Clark Warren Baker must also attend 52 weeks of sex offender counseling, and Los Angeles County Superior Court Judge Robert C. Vanderettold the defendant he will be subject to search and seizure conditions, including for electronic data and devices.

Baker could have faced up to three years in prison. He made an open no contest plea to the court on May 13 and did not negotiate a sentence with prosecutors, according to the Los Angeles County District Attorney's Office.

Prosecutors said images of child pornography were discovered on an external hard drive during a search of Baker's Los Angeles home last Nov. 28.

He was arrested at that time and released on $20,000 bail. The case was investigated by the LAPD Juvenile Division's Internet Crimes Against Children Unit.