A Glenrothes man was found hiding in a cupboard when police searched the house he had broken into.
James Graham had stolen a car from a relative and was seen with it outside the property in Markinch.
A suspicious neighbour called police after spotting the 29-year-old walking between the car and house in the early hours of the morning.
When officers arrived, Graham was found hiding inside.
The car’s owner has parked it at his home at around 4pm and was not aware it was missing until contacted by police.
Fiscal depute Catherine Stevenson told Kirkcaldy Sheriff Court the house had been locked and the neighbour was woken by a male shouting.
“He observed a vehicle outside the locus and observed a male running back and forwards between the locus and the vehicle.
“Police were contacted and when officers attended they observed the vehicle outside the locus with the engine running.
“They turned the vehicle off and entered the locus.
“They traced the accused within, hiding in a cupboard. “
She added officers made Graham take a breath test after finding a bottle of Johnnie Walker whisky in the car.
He was found to be 50% above the legal limit.
Valium and cocaine abuse
Solicitor James McMackin, defending, said Graham had issues with drugs.
He said: “This is a very reckless and unfortunate series of offences.
“The car is a relative’s car.
“He believed he would be able to steal controlled drugs at the locus.
“At the time he was abusing Valium and cocaine and had used Valium that day.
“That, in part, explains his recklessness.”
He added Graham is now seeking drug counselling.
Not guilty to some charges
Graham, of Canmore Path, admitted stealing a vehicle from Skibo Court, Glenrothes, before breaking into a property in Markinch on September 16 last year.
He further admitted driving with excess alcohol (37mics/22).
Not guilty pleas to charges of threatening and abusive behaviour, driving without insurance, driving on a provisional licence and failing to identify the driver to police officers were accepted by the Crown.
Sentence was deferred for reports and Graham was remanded in custody.
For the latest court cases across Tayside and Fife, join our Courts Facebook page.