A gang member played a vital role in a £360,000 drug mob from his jail cell.
Crawford Murphy was part of a crime clan caught dealing heroin and cocaine mainly in Dundee.
The 29-year-old was behind bars in late 2018 – but used a phone to instruct associates to deliver drugs.
But detectives soon swooped on the gang, including its leader Kevin Ferguson, 34.
Murphy, Ferguson and accomplices George Black, 31, and Zane Astbury, 36, appeared at the High Court in Glasgow.
Murphy and Ferguson pled guilty to being concerned in the supply of both heroin and cocaine.
Black and Astbury admitted being involved in trafficking heroin only.
The four will be sentenced next month.
Murphy, of East Kilbride, South Lanarkshire, was in jail up to December 10 last year.
Prosecutor Alan Cameron told the court: “He was serving a sentence, but was instructing, via telephone messages, an individual to supply drugs and collect money on his behalf.”
Murphy also told the person “how to package” cocaine into small bags.
Mr Cameron: “The individual sent back photographs to confirm that it was done properly.”
The court heard Murphy was linked to a £29,000 cocaine deal where drugs were to be picked up in Lanarkshire then taken to Dundee in November 2018.
Weeks later – after he is thought to have been freed – Murphy ordered the delivery of £151,000 of heroin.
Police eventually raided a flat in Dundee, where a man tried to hurl an envelope containing drugs out of a window.
Ferguson, meantime, was described as the head of the organised crime gang supplying drugs in the city.
He was also linked to two earlier drug deals.
Ferguson was further involved after £175,000 worth of the drug was seized at Black’s flat in Dundee.
Mr Cameron said: “Black and Astbury – who was also found there – had been working for Ferguson since September 1 2018 with the storage, packaging and supplying of drugs recovered.”
Ferguson was also spotted during the handover of £12,550 drugs cash in May this year.
Weeks later, he was seen getting out of a car in which heroin worth £1,070 was found.
Murphy’s charges spanned between August 2018 and February this year.
Ferguson’s involvement ran from September 2018 to May 2019.
Black and Astbury were part of the gang in September last year.
Murphy, as well as Ferguson and Black, both of Dundee, were remanded in custody.
Lord Arthurson continued bail for Astbury, also of Dundee.
Sentencing was deferred for reports.