An East Kilbride resident filmed a man hiding a machete in bushes in the early hours of the morning.
Daniel Dodds, 29, was jailed for 15 months when he appeared from custody via videolink at Hamilton Sheriff Court.
He admitted possession of a bladed item in Main Street, East Kilbride, on November 20 while on bail.
Neil Thomson, prosecuting, said a woman looked out of her flat about 4am and saw a man later identified as Dodds.
Mr Thomson told the court: “She saw him place something in bushes.
“This object was glinting and that attracted her attention. She filmed what she saw on her phone.
“A short time later the man returned and was seen to retrieve a large, machete-type knife and conceal this in his jacket.”
Dodds was traced to a nearby flat where the machete was recovered.
Defence agent Andy Thomson said Dodds was depressed because COVID-19 limits meant he couldn’t attend his grandfather’s funeral the day before.
He had been threatened over his relationship with two females and armed himself because of that.
He didn’t confront anyone with the weapon.
Mr Thomson added: “He had taken valium and alcohol. He was in a terrible state, but accepts he shouldn’t have acted in this way.”
Dodds was jailed for a year in December 2019 for threatening police officers while brandishing a knife in Alison Lea, East Kilbride.
Sheriff Linda Nicolson said he had a “poor” record for knife offences and other matters so prison was the only option for the latest matter.
She reduced the sentence from 20 months because of his early guilty plea and backdated it to November 23 as he has been in custody since then.