A drugs boss continued to mastermind his crack cocaine and heroin racket from his prison cell with the help of his girlfriend.
Paul Gairns, 41, was serving a six-and-a-half year jail term after being caught selling heroin to an undercover police officer.
And it was covert officers who again proved his downfall, and led to the discovery that Gairns was using his phone to direct drug dealing from his HMP Thorn Cross prison cell in Warrington.
Paul Healey, who acted as Gairns' "sales manager" on the streets, received messages from him while he was behind bars.
They included pictures of Gairns while he was in HMP Thorn Cross, in Appleton, a jail with open conditions, smoking what appeared to be cannabis, drinking beer and injecting suspected steroids into another inmate.
Gairns' partner Nicola Hutton, a mum-of-one, allowed her home to be used as the "warehouse" for the drugs racket, where they were cut and packaged before being sold.
Cash proceeds were also stored there.
Hutton said she was put under "significant pressure" by her partner, Gairns, to get involved.
Now all three have been jailed.
Gairns shouted "buzzing" after being sent down for nine years.
Healey, 28, of Woodward Place, Ancoats, shouted 'f****** kn******' after being locked up for six years and nine months, and Hutton, 36, of Manordale Walk, Harpurhey, was sentenced to three years and four months.
They all admitted conspiracy to supply class A drugs.
Another man, Grant Kelly, 20, of Old Mill Street, Ancoats, who dealt on the streets with Healey, was sentenced to 30 months in a young offenders institution after admitting supplying class A drugs.
Sentencing Gairns, Judge Patrick Field, QC, told him: "This was a commercial enterprise, audaciously run from your prison cell while you were serving a prison sentence for similar offences.
"You are a professional drugs trafficker, albeit not a very successful one, given that in the last 23 years you have received prison sentences totalling 31 years.
"You do not appear to have learnt any lessons."
Manchester Crown Court heard how in February last year, an undercover police officer with the code name Frank posed as a drug addict in Ardwick.
That operation snared Healey and Kelly.
Prosecutor Gavin Howie said on one occasion the pair were "aggressive" towards the undercover officer.
They accused Frank of being a police officer and warned they would "batter" him if he returned.
When Kelly was arrested the following month, he said: "F****** hell, I knew this was coming."
Then in September last year, the pair were caught in a stolen vehicle only stopped after a police pursuit and the use of a stinger.
Heroin, crack cocaine potentially worth about £5,000 and £110 in cash was recovered from the car.
Crucially police recovered a bronze iPhone, which showed Healey had been in regular contact with Gairns.
Cell site data for the phone showed that Gairns' phone was active in the area near HMP Buckley Hall in Rochdale, where he was serving at the time.
Data from the phone showed that despite being in prison, Gairns was managing the wholesale purchase of drugs, the distribution and sale of the narcotics as well as sourcing vehicles for them to use.
Officers also recovered another phone which contained the cannabis and beer selfies, taken after he had been transferred to HMP Thorn Cross.
Gairns has previously absconded from that prison after complaining that his home visits were being cancelled.
In July, he was found in a car with his partner, Hutton, and her child.
When police searched Hutton's home they found heroin and crack cocaine which police said could be worth anything from £26,665 and £43,900, depending on how it was sold.
Healey launched into an extraordinary rant when he was arrested by police.
He said: "That's why I'm out here doing s*** like this. How am I f****** living off £200 a month, on the f****** dole?
"Get it on your camera, I'm going to tell the f****** judge the same. This is why we're out here doing this s***, because the government are f*****.
"Otherwise we wouldn't be doing this s*** would we?"
He had tried to flush heroin and crack cocaine down the toilet, but 80 wraps of the drugs were recovered.
Defending Gairns, Mark Friend said that the defendant had accrued debts, and continued dealing after being "left in no doubt whatsoever that those debts ought to be paid."
Mr Friend said the fact that Gairns' partner became involved "weighs very heavily indeed on his shoulders."
"So it should," said Judge Field.
"It really is a pity he didn't think about it before."
Hutton's relationship with Gairns was described as "toxic'"by her barrister, Hugh Barton.
"She was reluctant to get involved herself, but due to the daily pressure and coercion she felt unable to refuse," Mr Barton said.
Sentencing, Judge Field said the conspiracy, which ran from September last year to October this year, was "sophisticated" and "long running" and promised substantial profits.
A Proceeds of Crime Act hearing, to reclaim some of the gang's ill-gotten gains, will be held next year.