A dealer caught with £36,000 of cannabis in his flat was visited by a customer looking to buy drugs during the police raid.
William Dorward was snared with the massive haul of the Class B drug after cops searched his Edinburgh home.
Prosecutors have now launched a Proceeds of Crime case against him to seize £6650 in cash which was also discovered at his address.
Dorward, 27, appeared at the city’s sheriff court on Friday and admitted being concerned in the supply of cannabis.
Fiscal depute Susan Dickson said officers found bags of cannabis and cannabis edibles at Dorward’s home in Gorgie.
During the search of the property, which lies a short distance from Hearts’ Tynecastle Stadium, Ms Dickson said 3.57kg of cannabis was recovered.
She said it had a street value of £36,310.
Ms Dickson said police were still in the home when another man came to the door “looking to speak to” Dorward who was under arrest.
The prosecutor said the man was searched under the Misuse of Drugs Act and found to have £2450 cash on him.
Ms Dickson said: “He said he’d attended to buy cannabis edibles from the accused.”
She said Dorward was taken to St Leonards police station where he claimed £3500 of the cash was casino winnings.
Dorward admitted being concerned with the supply of drugs between February 13 and March 7 last year.
Sheriff Alistair Noble deferred sentence on Dorward until next month for reports.