A man was caught with high-purity cocaine in the toilets of a Cardiff bar while celebrating his birthday.
Callum Paul was found in a cubicle at Coyote Ugly with 11 wraps of the drug after a security guard heard rustling and sniffing coming from the area.
Sentencing him at Newport Crown Court, Recorder Nicholas Gareth Jones said: “This is not the first time you have been caught.”
The court heard the incident occurred at the Coyote Ugly Bar in St Mary Street in Cardiff on April 21.
Gareth James, prosecuting, said a member of security staff checked the toilet area and found one of the cubicles closed.
He added: “He could hear sniffing and rustling.”
The court heard the security guard indicated he wanted to search Paul for drugs and found a bag of cocaine in his trouser pocket.
Mr James said there were 11 individual wraps, amounting to just under 4g, at 79% purity.
Prosecutors said the police were called and the defendant was arrested.
In his police interview he accepted he had bought the cocaine and was planning to share it with friends he was meeting later.
He told officers he was out in Cardiff celebrating his 23rd birthday and “clubbed together” with some friends to buy the cocaine.
The court heard he received a caution in 2012 after he was caught taking cocaine in a toilet cubicle at the Oceana nightclub in Cardiff.
Paul, 23, from Forge Road in Machen, Caerphilly , admitted possessing cocaine.
His defence counsel said he qualified as a plasterer after leaving school at 16 then worked as a steel fixer until he was made redundant last month.
The court heard he had no previous convictions and hopes to return to permanent work soon.
Recorder Jones said: “I do not think it quite crosses the custody threshold but you have come quite close because of your previous brush with the law.”
Paul was fined £500 and ordered to pay £85 towards prosecution costs as well as a £50 victim surcharge.
The judge made an order for the drugs to be destroyed.