A startled Blantyre woman woke up in the early hours to find a man had broken into her home and was in the process of stealing her car.
The quick-thinking female overcame her shock to contact the police, who arrested Stephen McKenzie before he could leave her driveway.
McKenzie, 33, of Calderwood Avenue, Blantyre, appeared from custody via videolink at Hamilton Sheriff Court on Friday.
He admitted breaking into a house in Auchinraith Road and attempting to steal the occupant's car on August 5.
McKenzie also admitted stealing clothing from a washing line and threatening or abusive behaviour towards police officers.
The court heard the woman was wakened by a noise around 3.20am and found signs of a disturbance in the kitchen.
Mairi-Clare McMillan, prosecuting, stated: "She heard a vehicle's engine and went outside to find a male in the driver's seat of her car.
"She called the police and officers arrived around 3.30. The car's headlights were on and the engine was revving.
"The accused claimed he was going to move the vehicle for his girlfriend.
"He was arrested and bags containing bottles of alcohol, a sat nav, sunglasses, a battery charger and face masks were recovered.
"Another bag contained clothing that had been taken from the washing line next door.
"McKenzie then began to act erratically. He shouted and swore at the police officers, adding 'Do you know who I am? I'll find you'."
McKenzie, who admitted previous convictions, was the subject of a supervision order at the time of the break-in.
His lawyer said drink and drug abuse is at the root of his offending.
Sheriff Thomas Millar deferred sentence for background reports and McKenzie was remanded in custody.
*Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live is on Facebook? Head over and give our page a share and a like.