Police detected a strong smell of herbal cannabis when they stopped a car, Magherafelt Magistrates Court was told.
Before the court was 21-year-old Steven Forysthe, of Millrace Square, Moneymore, was fined a total of £115 for possessing the drug.
The court heard a police mobile patrol in the Hillhead Road area stopped and spoke to the driver of a car on the afternoon of January 14 this year.
A prosecuting lawyer said officers detected a strong smell of herbal cannabis and asked the occupants to get out to allow them to carry out a search of the vehicle.
He said police found a bag in the back of the vehicle containing cannabis and the defendant came forward claiming it was his.
The lawyer said Forysthe was taken to the police station where he made a full statement of admission.
Defence solicitor Donal Heron said Forsythe regretted the incident and asked for him to be given credit for his early plea.
Mr Heron pointed out that the defendant had failed to turn up at the last court because he got his dates mixed up.
District Judge Alan White told defendant that it was his first time in court for a criminal offence and if there was another occasion a pre-sentence report would be ordered. Mr White made an order for the destruction of the drug.