A scout leader who kept 14,000 indecent images of children on his laptop computer has avoided a prison sentence.
A judge told Melvin Penn, 59, of Stockport, Greater Manchester, he wanted to help him cope with his problems as well as punish him.
Penn admitted possessing and downloading photos of children at a hearing in November.
He was given a three-year community punishment order at Manchester's Minshull St Crown Court on Thursday.
'Felt ashamed'
At an earlier hearing, Penn had admitted five counts of downloading indecent photographs or pseudo-photographs of children.
He also pleaded guilty to one charge of possessing 14,000 indecent photographs or pseudo-photographs of children.
Mark Ford, defending, told the court his client felt ashamed of himself.
He was given a permanent Sexual Offences Prevention Order, which orders him not to communicate on the internet with boys aged under 16 or carry out any work which could bring him into contact with them.
He was also placed on the Sexual Offenders Register for 10 years.