Police found cocaine worth £19,000 when they raided a house in Mossend.
James Hall, 34, appeared at Hamilton Sheriff Court this week. He admitted being concerned in the supply of the Class A drug at his Clyde Drive home on May 15 last year.
Aga Mathieson, prosecuting, said there was no one at home when police officers armed with a search warrant arrived.
She told the court: "They forced entry and during a search found four bags of white powder in a bedroom cupboard.
"The accused's DNA was recovered from two of the bags.
"The powder tested positive for cocaine and had a purity of 80 per cent. The total value was about £19,000."
Hall, who has no previous convictions, made no reply when charged by police.
Defence solicitor Mary Ellen Scobbie said her client has mental health issues and a medical report will be produced for a future hearing.
Sheriff Louise Gallacher deferred sentence until next month.