ALMOST a third of offenders tested positive for illegal drugs when they left prison last year, according to new figures.

The statistics, published by the Scottish Public Health Observatory, found of the 633 people tested when leaving jail in a one-month period in 2016/17, 30 per cent were positive for illegal drugs, including the illicit use of prescription drugs.

The proportion has gradually increased since 2009/10, when the figure stood at 17 per cent, and is up on 2015/16 when 27 per cent tested positive.

Addiewell Prison in West Lothian recorded the highest rate last year, with more than half of those leaving testing positive for illegal drugs.

The drugs most commonly detected when leaving prison were buprenorphine, used to treat addiction and found in 12 per cent of tests, cannabis — detected in nine per cent of tests — and opiates such as heroin, also found in nine per cent of tests.

The data also shows just over three-quarters of the 1,026 people arriving at prison in a one-month period last year tested positive for illegal drugs.

Since 2010/11, the proportion testing positive when entering prison has been relatively stable, ranging between 70 per cent and 77 per cent.

A statement from the Scottish Prison Service said: “Recovery is the explicit aim of all services providing treatment and rehabilitation for prisoners with drug problems.

“A range of substance misuse treatment and support services are provided by adopting a multi-disciplinary approach.

“A comprehensive range of robust security measures are in place to prevent the introduction of contraband into our prisons.

“Significant investment continues to be made in the development of new technology and staff training to detect, deter and reduce the availability and supply of illegal drugs.

“Anyone found in possession of contraband is reported to the appropriate authorities.”

Meanwhile, Scotland’s chief inspector of prisons said inmates were being set up to fail when released from jail.

He said this is because of inadequate housing and benefits as he published his report into conditions at Edinburgh’s Saughton Prison.

David Strang said positive efforts to prepare prisoners to return to the community within jails were being undermined by housing shortages and a lack of access to healthcare.

He added: “The longer I do this job the clearer it is to me that if you are going to try to reduce offending, when they leave there absolutely has to be the basics for human life in place. Accommodation, money, health care are vital especially for someone with addictions. If people are released without those protective factors in place, we shouldn’t be surprised if they end up back in prison.”

One prisoner whose sentence ended just before inspectors arrived was released but told by a housing officer there was nowhere for him to stay, he said. After a lengthy wait, the man was provided with a room in a shared house where the heating was broken and the toilet was blocked. A support worker from the prison managed to source him a warm jacket and food from a food bank but not all inmates get such help.

“It is surely not acceptable in 2017 that someone, especially a vulnerable individual is liberated from prison without a place to stay or the money they require to survive,” said Strang.