A violent thug filmed armed police officers who laid siege to his East Kilbride home during a three-hour stand-off.
Thousands of people viewed the drama as Ryan Chalmers shared footage on social media.
The dad-of-two had earlier threatened a neighbour with a weapon.
Chalmers, 32, was jailed for 10 months when he admitted threatening or abusive behaviour at his home in Lyttleton on July 25.
Hamilton Sheriff Court heard the neighbour was sitting on his doorstep about 6pm when topless Chalmers came out with a pick axe shaft, shouting: “I’m going to kill everyone. They can’t touch me.”
He called the neighbour a “grass” and challenged him to fight.
Police, who’d been told that Chalmers was armed, arrived to find him threatening to “chop up” his neighbour.
Rebecca Clark, prosecuting, told the court: “Further police officers attended and the accused retreated into his house, saying they would have to ‘come through the door’ as he was barricading himself in.
“Specialist firearms officers arrived at 6.50pm, but Chalmers refused to open the door.
“He began filming the police officers, saying he was going to livestream it.
“Subsequently the footage attracted thousands of viewers on TikTok.
“Chalmers at one point threw the pick axe shaft of a window. Specialist negotiators became involved at 7.20pm and an ambulance was summoned. Chalmers could be heard shouting ‘They’re shooting me’.
“At 9.50pm he finally agreed to leave the house.”
Defence lawyer Laura Kiernan claimed the trouble started because the neighbour had filmed her client’s partner getting dressed and shared this on social media.
She added: “Ryan Chalmers struggles with his mental health. When he saw the firearms officers he was scared and started filming for his own protection.”
Jailing Chalmers, Sheriff Louise Gallacher noted he has a record for violent crime. She added: “You caused considerable fear and alarm. Police resources and those of other emergency services had to be deployed.”
*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 to our page to give us a like and share.