Police swooped on Shaun Crossman shortly after he was seen leaving the address of Liam Keenan carrying a distinctive bag.
Crossman, 49, was arrested in a takeaway a short time later. The same bag was found hidden behind his sofa and contained a kilo of cocaine worth between £40,000 and £50,000.
Teesside Crown Court heard the drug was 83% pure.
Tom Mitchell, prosecuting, said: "There was telephone contact between Keenan and Cossman, the Crown say, to alert Crossman to the fact the drugs were ready for collection.”
Police also raided Keenan’s address and found just under half a kilo of the same class A drug, valued at between £20,000 and £40,000 together with £4,700 in cash.
Mr Mitchell added: “Police forced entry. They saw white powder in the kitchen and a broken block of 489 grams of cocaine.”
It was 86% pure and said to come from the same source as that found on Crossman.
Crossman claimed he was paid £80 to store the drug believing it was cannabis.
He later accepted he knew it what it was by admitting a charge of conspiracy to supply cocaine.
Keenan, 36, pleaded guilty to the same charge and accepted responsibility for one and a half kilos of cocaine.
His barrister David Bentley said he agreed to get involved to pay off a £5,000 cocaine debt from using the drug to deal with a family bereavement.
It was said he only took possession of the drugs the same day they were seized.
Mr Bentley said Keenan was “deeply remorseful” of his “foolish” decision.
Stephen Constantine, mitigating for Crossman, of Hutone Place, Hartlepool, said he was desperate for cash and used the money he was paid for food.
He added it was a “one off” and Crossman had no previous drug trafficking offences.
Recorder Thomas Moran told Crossman: “You were still playing an active role in the supply of a large amount of high purity cocaine.”
Both men’s barristers said their clients had suffered from the long delay in the case. They were arrested in July 2017, but not charged until October last year.
Keenan, of Dobson Place, Hartlepool, was jailed for five years, and Crossman for 32 months.