A former police chief inspector who admitted downloading indecent images of young boys has avoided a jail sentence.
Steven Sansbury left Lancashire Police in "significant shame" when the pictures were found in January 2021.
The 55-year-old pleaded guilty to two counts of making indecent images of children between January and February 2009.
He was sentenced to a 12-month community order, including 80 hours unpaid work, at Manchester Crown Court.
Sansbury was arrested at his home in Blackburn and a laptop and portable hard drive were seized.
Seven Category B and three Category C images of young boys were found, the court heard.
The offences happened between January and February 2009.
The prosecution said Sansbury was interviewed in August 2021 and had explained that he had searched for homosexual pornography.
David Pojer, defending, said: "Mr Sansbury comes before the court humiliated, having been a senior police officer for three decades.
"The effect of losing his good character and moving from a senior officer to the dock is a salutary lesson.
"It is sobering."
He said the offending involved a "very limited number of images", with no determined internet searches.
Judge Nicholas Dean KC ruled the case did not cross the custodial threshold.
He told Sansbury: "You served, no doubt with some distinction, as a senior police officer for many years but the circumstances in which you have the left the police have brought significant shame to you.
"Those who are determined to access this sort of material, which sadly is too easily accessed on the internet, will do so persistently and often accumulate thousands of individual images.
"In circumstances not entirely clear, you kept them in a folder before this criminality was uncovered."
He said it was clear he had not sought out this type of material "in any sort of consistent way".
"The loss of your good character and the shame of your departure from the police force in these circumstances is plainly a significant punishment," he added.
The judge imposed a 12-month community order involving 80 hours of unpaid work and a 10-day rehabilitation activity requirement.
Sansbury will remain on the sex offenders' register for five years.