A young south Derry man who was found with 8.18 grams of cannabis in the front of his car, was fined a total of £165 at Magherafelt Magistrates Court.
Kyle Simon Marshall (21), of Mullagh Road, Maghera, admitted possessing the drug on February 9, 2016.
Counsel prosecuting told the court that police had occasion to speak to the defendant, who was in a parked car at the KFC drive-thru.
She said officers detected a smell of cannabis and carried out a search of the vehicle.
She said they found five bags of cannabis in a compartment beside the gear stick, weighing approximately 8.18 grams.
A defence lawyer claimed Marshall had a hip problem at the time and was self-medicating.
She said he later sought help from a doctor with regard to the problem and stopped taking the cannabis.
The lawyer said defendant had another appearance before the court for a similar offence in April 2016, but has nothing more pending since the date of this offence.
She pleaded with the court to take this into account when imposing the sentence.
Imposing the fine, District Judge Oonagh Mullan told Marshall that he had now appeared before the court for a third time in connection with a drugs related matter.
She made an order for the destruction of the seized cannabis, and refused an application by his lawyer for legal aid.