ONE of Scotland's most notorious prisoners, who turned to religion and now describes himself as a retired bank robber, has failed in a human rights bid to win his freedom.

William Varey, who was sentenced to 29 years for bank robbery, prison-breaking and attempted prison-breaking, argued that Scottish Ministers' decision to recall him to prison was a breach of his right to liberty under Article 5 of the European Human Rights Convention.

But Lady Paton has ruled that Varey's continuing detention is due to a decision by the parole board, which will not be subject to human rights legislation until October. The decision means that Varey, 51, will stay in Shotts prison even though the drugs charge that led to him being sent back to jail has now been dropped by the Crown.

Varey, a former Scots Guard and French Legionnaire, was jailed for 14 years in 1976 for two armed bank robberies, but the sentence was cut to 10 years. In June 1984 he was again sentenced to 14 years for robbing the Clydesdale Bank in Lockerbie while armed with a sawn-off shotgun.

He was detained in Peterhead maximum security prison and tried to escape twice before finally succeeding in 1989 by cutting his way out of the aviary where he kept budgies. He was recaptured 48 hours later waiting for a bus.

Lady Paton, who issued a written decision in the case at the Court of Session yesterday, said that in 1997 the parole board concluded that Varey had embarked on a new chapter in his life by turning to Christianity. The board unanimously agreed to recommend a release, and Varey was released on licence in May 1998.

He obtained a flat in Glasgow and started a decorating business, Kensington Restorations, but six months after his release an acquaintance was arrested and charged with being concerned in the supply of cannabis resin.

Six months later, in July 1999, Varey himself was arrested and charged with being concerned in the supply of cannabis.

The day before his bail appeal was due to come before the High Court the Scottish Ministers revoked his licence and recalled him to custody without consulting the parole board. Varey was informed that he had been charged with drugs offences which suggested that he presented a serious threat to the public if at liberty.

He protested that he was a retired bank robber who had been trying to go straight and had never been involved with drugs.

Lady Paton pointed out that where Scottish Ministers revoked a licence in a case like Varey's it had to be referred to the parole board and if the board recommended the prisoner's re-release on licence Ministers had to accept that.

In this case the board had recommended in August 1999 that Varey should be kept in because the drugs charges suggested that he presented a serious risk. Lady Paton pointed out, however, that when Varey's case called at the High Court in Glasgow a few weeks ago the Crown was refused an extension of time and did not proceed with the charges, which are now time-barred. She said that if the Scottish Ministers' decision to recall Varey's licence were quashed he would be eligible for release, but they argued that their actions had been superseded by the parole board's later decision to keep Varey in prison.

Lady Paton said: ''Viewing the system as a whole, I consider that Varey's current continuing detention is attributable to the parole board's decision of August 31, 1999 which in effect reviewed and superseded the Scottish Minister's decision of July 7, 1999.''