Mr Kesner said the following day Pawsey tried to persuade a friend to go to the lido and retrieve the phones for him. But the friend decided instead to call police. Officers found the phones in the cistern and initially they would not work.

But when they had been dried out they were checked and more than 450 indecent images were found.

Mr Kesner said 292 images were the least serious Level 1. Another 42 were Level 2, there were 67 Level 3 and 62 Level 4 pictures. One video clip at Level 4 was also found.

At the time of the offences Pawsey was already required to sign the sex offender register after being cautioned by police for an assault on a girl under 16, Mr Kesner said. He had breached the order by failing to notify police of a change of address.

Pawsey admitted a charge of using threatening behaviour with intent to commit a sexual offence on 11th May last year.

Mr Kesner said this entailed Pawsey going up to the ten-year-old girl in the shallow end of the lido and engaging her in conversation. He asked her where she lived and also asked for her mobile phone number, which she couldn’t remember.

Then he whispered in her ear three times: “Do you dare me to take my shorts off?”

“The girl became quite distressed at that and burst into tears,” Mr Kesner said.

Pawsey also pleaded guilty to possessing a small amount of mephedrine, an illegal class B drug, and he admitted 10 charges of possessing indecent images of children.

Defence barrister Con Fernandez said of his client: “He is a very sad and ineffectual man. He is very isolated. He had been in a long-term relationship for several years and then discovered his partner was having an affair.

“Within a month of that he lost his job and got into financial difficulty and was evicted from his home.

“Until that point his life had been reasonably good. He spent three weeks living in a tent and then a bedsit surrounded by Eastern Europeans who do not speak the language.

“During this period of vulnerability he was introduced to drugs and he started taking mephedrone.

“Add to that the difficulties he has with hearing and an injury resulting from an incident where he jumped from a first floor window – he has not had the best time of late.

“He very much regrets these offences and in particular any distress he may have caused the child. He wants to do something about his problem.”

Judge Jamie Tabor QC sentenced Pawsey to a three-year community order with a requirement to attend the Thames Valley Sex Offender programme. He also ordered him to pay a £60 surcharge.