A church caretaker has been jailed for four-and-a-half years after abusing a five-year-old girl and secretly taking a picture of children on a beach which he distributed on the internet.

David Bailey, aged 25, of Back Chapel Street, Tottington, also admitted possessing and downloading more than 3,000 indecent photographs of children.

Joseph Allman, prosecuting, said Bailey was caught after New Zealand police received evidence that someone with a username Twistedluvr1 was sharing indecent images of children in an online forum.

The computer was tracked to Bury Fellowship, where he had worked for four years, and Bailey had access to the computer. Mr Allman said: “On September 9, Bailey was arrested at home in Tottington. His home was in a state of disarray. The floor and furniture were 18-inches deep in rubbish.”

Bolton Crown Court heard on Friday that some of the chat logs recovered from Bailey’s computer suggested he had abused a five-year-old. The victim was spoken to by police and said she had been tickled all over her body by Bailey.

Lisa Roberts, defending, said: “There have been many occasions in which he penned letters to the victim’s family but not sent them.

“The trauma was greater for the parents than the child. Because of her age she doesn't understand the importance and seriousness. She retains her childhood innocence as mercifully shown and we are all grateful for that.

“Bailey is at a loss why the offences occurred. There is little wonder he had the life he did. He was bullied and humiliated at school.”

She said he had little social interaction outside of church. Bailey was said to suffer from depression, insomnia and anxiety.

Judge William Morris, sentencing, said: “The images were taken by others when the children were grossly abused in the most horrific ways. These for the most part were very, very young children.

“It is difficult to imagine what must have been going through those children's minds as they suffered those terrible incidents and having somebody save them and put them on a website for you to take pleasure in watching those terrible things.”

He said the people in the photograph taken on Blackpool beach of a mother drying her children were unknown.

He added: “You can be described as an inadequate, isolated loner unable to cope with life. You have slowly but surely isolated yourself. I have no doubt that is why you turned to using the computer for sexual gratification.”

Bailey, who had no previous convictions, pleaded guilty of seven counts of making indecent photographs of children, six counts of possession of indecent images with a view to distributing them, and sexual assault.

He also admitted to theft and fraud after pawning a camera at Cash Converters for £15. He hadborrowed the camera from Bury Fellowship.

In addition to his jail term, Bailey was placed on the Sex Offenders Register for 10 years, and disqualified from working with children for life.