Geraint Walters, prosecuting, said Phillips had been released from jail under licence when police searched his then home on December 21, 2012, and saw him throw a package into the garden which contained 38 grams of amphetamine.

He was arrested but then there was “an inordinate delay” before he was charged with possessing the drugs with intent to supply, which he admitted.

By then, said Mr Walters, police had targeted a car driven by Skyrme in which Phillips was a passenger.

Officers could not find any drugs at first but took Phillips into custody. A short while later he went to the toilet and produced a bag containing 27 grams of heroin.

Dyfed Thomas, representing Phillips, said he had to accept that he had been under licence from prison when he committed the amphetamine offence and on police bail when he began running heroin into Pembrokeshire.

Judge Keith Thomas said Phillips had a formidable record going back to 1989, which included the growing of cannabis and the actual supply of amphetamine.

Skyrme, he said, had driven Phillips to Cardiff in return for petrol money and some of the heroin, but his offending had been persistent.

Phillips was jailed for four years and Skyrme for two and a half years.