A volunteer at a Birmingham children's hospice who built up an "enormous archive" of child pornography over more than a decade has been spared a jail sentence.

David Rollason, 52, amassed a collection of 40,530 pornographic images, many of which depicted young children, until his arrest in July last year.

Birmingham Crown Court heard that he downloaded the material from the internet, storing images in folders on his computer and laptop, arranged according to the children's ethnicity, hair colour and the manner in which they were pictured.

The divorced father-of-two, of Wentworth Court, Erdington, Birmingham, had been a volunteer for Acorns Children's Hospice for around six years, working with siblings and families of children with life-threatening illnesses.

The court heard than "extensive" investigations had revealed no impropriety in his position with the charity, which has hospices in Birmingham, Walsall and Worcester, and there is no suggestion that he abused or photographed any of the children he came into contact with.

At an earlier hearing Rollason admitted four counts of making indecent images of children, five counts of possessing indecent images of children, two counts of possessing extreme pornographic images and one count of distributing extreme pornographic images.

His Honour Judge Roderick Henderson, sentencing, imposed a three year community order, despite telling Rollason that a jail term would be "appropriate".

He said: "You have, over a period of 10 years, assembled an enormous archive of pornography including in particular a very large amount of child pornography which can be summarised as over 40,000 indecent images, some of them films."

Explaining his decision to impose a community order instead of a custodial sentence, he said: "The appropriate sentence would be something like you going to prison for two years."

But the judge said that a two-year sentence would only see Rollason in jail and "out of circulation" for around six months once time already served on remand was taken into account, which would not allow enough time for him to undergo sex offender treatment.

Stressing that his main concern was to protect children by ensuring proper treatment for Rollason, the judge said: "I have no doubt that the best for the children to whom you pose a risk would be for you to complete a community order."

He added: "You present a common and complicated picture for a court to deal with. My main aim in sentencing you is to protect children in the future."

Rollason was disqualified from working with children and ordered to sign the sex offenders register for five years. The judge also stipulated that he must complete a sexual offenders treatment programme.