Undercover police discovered drugs stuffed inside a handbag after spotting a man lighting up in an Elgin car park.
Officers were in an unmarked vehicle earlier this year and immediately became suspicious when they saw Robert Cook smoking, what appeared to be a cigarette, shortly after 3pm on April 26.
When police questioned the 23-year-old and the other two people inside the Honda Civic, they subsequently discovered nearly £400 worth of cannabis.
Yesterday Cook, who lives in Elgin, avoided a prison sentence at Elgin Sheriff Court after admitting dealing drugs at the Hamilton Drive car park and elsewhere in the town between April 20 and April 26.
Defence solicitor Grant Daglish explained his client had not started the enterprise for profit – but purely to fund his own habit.
Fiscal Alex Swain said: “The accused was within the car with two people. Police walked to the vehicle. When the accused saw them, he dropped the rolled cigarette and another small item.
“The windows of the car were down and they could smell cannabis. A small bag containing a green herbal substance was on the passenger seat.”
She added: “One of the witnesses in the car said ‘There’s more of the same in my bag.’ In the handbag, there was a black smell-proof bag with 17 rolls.”
Police recovered a total of £380 worth of cannabis following a search.
Texts were found on Cook’s mobile phone from people asking if he “had smoke” as well as others sent by the accused saying “Just let me know if you need again.” and “haze just in”.
Mr Daglish said: “This has been a wake-up call for Mr Cook. He has now gone six weeks without taking the drug.”
Sheriff Olga Pasportnikov said: “Supplying drugs to other people for whatever purpose is always going to be a serious matter.
“I understand you have taken steps to try to abstain from drugs and I hope you continue to do so.”
Cook, of Mossend Place in Elgin, was sentenced to 160 hours of unpaid work after admitting being concerned in the supply of cannabis.