THE emergency Bill designed to plug a legal loophole exploited by Noel Ruddle could be tested for the first time when child killer Brian Doherty appeals for his release from the State Hospital at Carstairs.

Doherty was transferred to Carstairs from Belfast after he developed a mental illness while serving a life sentence for torturing, killing and mutilating an 11-year-old boy in 1995.

Like Ruddle, he is claiming he can no longer be treated and it is thought he could win his appeal at Lanark Sheriff Court.

If successful, he will be returned to prison in Northern Ireland to serve out the rest of his sentence, unlike Ruddle who was released on to the streets.

However, his transfer is set to be opposed by the Scottish Executive which could evoke the Mental Health (public safety and appeals) (Scotland) Bill, even though it has still to reach the Statute Book.

The Bill was drawn up after Noel Ruddle, who shot his neighbour with a Kalashnikov in 1991, was released from the State Hospital when a sheriff ruled that since his personality disorder could no longer be treated, he should no longer be held, despite the fact that he remained a danger to the public.

MSP Phil Gallie, home affairs spokesman for the Scottish Conservative Party, said: ''There is a date within the Bill - any appeals that are put into position after September 1 would be subject to the conditions of the Bill.

''If Ministers have any concerns, or clinicians or psychiatrists have any doubt, we would be able to use the Bill to keep Mr Doherty at Carstairs if that was needed.

''However if his treatment is finished and if he is going back to prison, we have no difficulty with that.

''He was convicted of a crime and he was sent to prison. His problems arose in prison. It is totally different from the Noel Ruddle case.

''Having said that, we would believe there should be no parole for someone like Mr Doherty.''

A second child killer, Karl Tonner, has also applied to Lanark Sheriff Court for his liberation.

Tonner, who was detained at Carstairs without limit of time after he killed a schoolgirl in Dundee in 1968, is claiming doctors can no longer treat him.

Yesterday SNP Shadow Justice Minister Roseanna Cunningham said his case would be the real test for the Bill, which states that a sheriff can refuse an appeal if the patient is ''suffering from a mental disorder the effect of which is such that it is necessary, in order to protect the public from serious harm, that the patient continue to be detained in a hospital, whether for medical treatment or not''.

She said: ''Although the Bill will apply to Doherty's hearing, it will be surprising if they could get any mileage out of the public safety issue.

''I think the first real test is

Tonner's case.

''Doherty is in a different category because the result of his appeal is the transfer to a different kind of custody. He is going back to prison and when he goes back to prison he will see out the remainder of his sentence.

''The issue for Ruddle was not that he was getting out of Carstairs, but he was going to get out of Carstairs and not be under any sort of supervision.''

A spokesman for the State Hospital yesterday declined to comment on reports that Doherty's treatment has been successful.

He said: ''We cannot comment on individual patients.''

However, he added: ''It is public knowledge that Mr Doherty has lodged an appeal about his detention at the State Hospital. It is also public knowledge he has a life sentence from the Northern Irish courts.

''It is up to the court to decide if his appeal is successful or not.

''If someone was to be released who had come from the prison system, generally they are returned to the prison system.''

A spokeswoman for the Scottish Executive said: ''The Executive plans to oppose the appeal.''