A Lochgelly man repeatedly gave cannabis to a 12-year-old schoolboy.

As a result, 47-year-old Brian Barnes, of Adam Place, appeared at Dunfermline Sheriff Court.

He admitted that on various occasions between July 1 and September 13 at an address in Cowdenbeath, he supplied a controlled drug, cannabis to a boy then aged 12.

Depute fiscal Azrah Yousaf said the matter came to light when the boy’s mum could smell cannabis on his clothing. She looked at his phone and saw conversations between the boy and Barnes about buying cannabis. She then contacted the police.

Defence solicitor Stephen Morrison said his client was a long-term cannabis user and “feels for him there as some benefits relating to his mental health problems”.

The boy had already started using cannabis before he began asking Barnes to buy him it.

“He resisted that initially but eventually agreed to give him it. He realises now it is a serious matter and regrets doing it,” added the solicitor.

Sheriff Garry Sutherland told Barnes: “I find it difficult to understand how you thought this would make sense at any level.”

He imposed a three-month restriction of liberty order.