A SHAMED priest caught with thousands of child porn pictures will be free to work again with youngsters after a legal mistake when he was jailed yesterday.

Father Michael O'Kelly - the former Catholic Dean of Reading - was handed a nine-month sentence and will spend a further six years under supervision by authorities and 10 years on the sex offenders' register.

But a lifetime ban on ever working with children ordered by Judge Stanley Spence had to be overturned almost immediately after the judge was told he had made a mistake and did not have the power to impose it.

Although the sentence is considered to be the combined six years and nine months, the law says Judge Spence could only make the ban if the jail term was 12 months or more.

O'Kelly, 47, was caught when police and customs officers raided English Martyr Church's presbytery in west Reading on October 19 last year and uncovered up to 12,600 depraved computer pictures of children among 18,000 images. The pictures downloaded from the Internet showed babies and children aged up to 14 in sickening poses and full sex acts, Reading Crown Court heard. Other pictures showed animals.

Prosecutor Neil Moore said: "He explained the purpose was a sexual one that led to fantasy and masturbation."

Children's safety campaigner Kidscape yesterday condemned the mistake and called for a change in the law.

Projects co-ordinator Megan Burns said: "It is a legal blunder and because of this pedantic law, this priest could work with children and that is ridiculous.

"Who are we concerned about here? Child protection or the law itself? It's appalling. How much more evidence do we need?"

O'Kelly - whose future as a priest has yet to be decided by the Portsmouth diocese - started treatment at a Surrey clinic for child sex offenders soon after he was arrested.

He admitted one charge of making indecent pseudo-photographs of children between June 1997, when he started as parish priest at English Martyrs, and last October. Pseudo-photographs is the legal term for computer pictures.

Handing in letters from O'Kelly's therapist and other supporters, Jennifer Edwards, defending, appealed to Judge Spence not to jail the priest.

O'Kelly had not abused any children or passed on the porn and Miss Edwards said she did not believe he would download any porn off the Internet again.

"I do not wish to overplay his standing in the priesthood until now, but it is clear from the evidence before me and the letters that Mr O'Kelly was, up until 1997, beyond criticism," she said. "Rehabilitation is a crucial part of securing this man's future. Without it he really has no future."

O'Kelly, dressed in a dark suit with grey turtleneck top, stood impassively as Judge Spence said he had no option but jail because buying the porn perpetuated "this awful treatment of children".

Calling it a tragedy, Judge Spence added: "It is true to say that a person in your position falls very hard when you fall from grace."

Mistakenly imposing the ban, Judge Spence said: "You are disqualified from working with children because of the danger you may bring them. That's not to say you have [abused children]. It is precautionary. It is another power that I have here."

When he recalled the court to rescind the bogus order, Judge Spence said the law also said he could not make the ban if he was not satisfied there was a danger of abusing children and he had imposed it only as a precaution.