A man ignored a non-harassment order when he went to his ex-partner's East Kilbride home and asked if she would do his laundry.
Daniel Hussain later caused a disturbance at the house and threw a wheelie bin at a car.
Hussain, 29, a prisoner, appeared at Hamilton Sheriff Court this week.
He admitted breaching a two-year non-harassment order imposed at Glasgow Sheriff Court in November 2020 by having contact with the woman in May last year.
Hussain also admitted threatening or abusive behaviour at her home on Forbes Place.
Alice Carey prosecuting, said the complainer and a child were in the house when Hussain turned up unexpectedly.
She told the court: "He asked if she would help him wash his clothes."
To avoid trouble the complainer agreed, but Hussain then accused her of sending messages and speaking to another male.
He shouted at her and tried to seize her phone. She managed to contact the police and the accused left.
Ms Carey added: "Officers found her locked in the bathroom. She was visibly shaken and upset."
Hussain returned to the address later that day. He banged on the door and threatened to damage property before lifting a wheelie bin and striking a car with it, causing damage to the vehicle.
Police were again called and he was arrested in Queensway, East Kilbride.
Defence agent David Kinloch said Hussain has drink and drug issues.
He told the court: "There was an open invitation for him to go to his ex-partner's house for help with his washing, but his behaviour thereafter is inexcusable."
Sheriff Thomas Millar described Hussain's criminal record as "terrible".
However, the sheriff took into account that he had been held in custody since his arrest.
Hussain was put under supervision for 18 months and told to attend for alcohol and addiction counselling if required.
The sheriff also imposed a fresh two-year non-harassment order.
*Don't miss the latest headlines from around Lanarkshire. Sign up to our newsletters here.
And did you know Lanarkshire Live had its own app? Download yours for free here.