A man fled out a back window as a postman arrived at the front door with a secret cannabis package during a police raid on the flat.
Craig Merchant made a run for it but was caught with cannabis in his rucksack and he had left a trail of fingerprints on drug packages in the property.
Merchant was being chased by drugs squad officers while another answered the door to the flat and was asked to sign for a consignment of cannabis by an unsuspecting postman.
The illicit drugs were addressed to Merchant’s co-accused Steven Lorimer, who had been bragging to customers about being a “one-stop cannabis shop”.
Depute fiscal Eilidh Robertson told Perth Sheriff Court Merchant was linked with nearly half a kilo of cannabis with a street value of £4,680.
Solicitor Paul Parker-Smith, defending, said: “This took place at a dark and difficult time in his life. Time has moved on. He has turned a corner.”
Merchant, 25, of Scott Street, Perth, was ordered to carry out 275 hours’ unpaid work after he admitted being concerned in the supply of the drug.
Lorimer, 30, of St Madoes, had earlier been jailed for 39 months after he admitted supplying the drug in St Madoes between June 19 last year and February 12.
Miss Robertson told the court: “A member of staff intercepted a package at the Royal Mail sorting office as it smelt strongly of cannabis. The package was addressed to Lorimer.
“It was opened and three packages of cannabis, each weighing around 26 grams, was found within.”
She said a search was carried out on July 18 last year and the accused was detained after arriving smelling strongly of cannabis. Cannabis packages were found in his rucksack.
Lorimer had around £1,000 in cash and told officers: “Everything in the house is mine. I use cannabis for medical purposes.”
Miss Robertson said: “On 12 February 2019 a further search warrant was executed at Philip Redford Court, St Madoes. On this occasion both accused were traced in the property.
“As the officers approached the property they saw Lorimer hide items under cupboard kickboards and saw Merchant try to jump out the property through a rear window.”