One of Scotland's youngest ever killers died behind bars after taking the street drug Spice, a sheriff has ruled.

Murderer Thomas Shields passed away as a result of taking the synthetic cannabinoid known as a "zombie" drug.

Shields, 30, was being held at HMP Castle Huntly and had been preparing for release when he died in October 2017.

A fatal accident inquiry at Perth Sheriff Court was told the drug 5F-mdmb-Pinaca was first identified in Hungary in 2014 and was used by prisoners because it did not show up in random drug tests.

The probe heard prison bosses admit they could not completely stop prisoners from smuggling contraband into the jail.

The inquiry was told there were around 170 inmates in the prison but as many as 100 could be out on home leave or work placement on any given day.

Shields, who was serving life, had been subject to disciplinary proceedings in early 2017 after being found under the influence of drugs in his cell but had been considered a trusted inmate.

But after he was found dead in his cell a post-mortem examination ruled drugs had caused his death.

Shields, from Glasgow, was convicted of murder and jailed for life in 2004, with the punishment period reduced from 18 to 14 years on appeal.

He was just 15 when he bludgeoned James Herd to death in the street with a metal pole and jumped on his head.

Sheriff Pino di Emidio has ruled he died from taking Spice but added nothing could have 'realistically' prevented the incident.

The FAI was told he had successfully completed home leave periods including his final placement with Tayport Junior Football Club.

Sheriff Emidio said: "When he was found he had been dead for some time and there was no immediate sign of what had caused his death.

"At post mortem the cause of death could not be ascertained from immediate physical examination of the deceased.

"Samples were taken for toxicological examination. That examination established that he had died as a result of the adverse effects of the chemical compound 5F-mdmb-Pinaca. "

He added: "The evidence satisfied me that there was regular drug testing and searching of the deceased and of his physical environment in Castle Huntly.

"The deceased received a caution in February 2017 for apparent drug misuse but otherwise he appeared to be positively engaged and having regular home visits.

"Tragically the deceased, who had been incarcerated from a very young age, was close to release on licence at the time of his death.

"He was in the independent living unit and as a result in a trusted position."

Sheriff Emidio concluded: "In the circumstances, I agree with those who participated in the inquiry that there were no reasonable precautions that could have been taken that might realistically prevent other deaths in similar circumstances."