CCTV shows a cocaine -fuelled man use a barrier as a ram after he was told to wait his turn to enter a nightclub.
Keith Williams, 47, had taken cocaine for the first time before the shocking incident outside Copa nightclub in Caernarfon, North Wales.
The security guard needed hospital treatment for his injuries after the incident which took place on July 18, last year, North Wales Live reported.
Williams pleaded guilty to affray and possession of cocaine and was slapped with a suspended 12-month prison sentence.
Prosecutor Nicola Williams said that Williams was outside the nightclub in the early hours of that Sunday night, as customers waited to get in.
He asked a security guard if he could be allowed in but was told to wait.
Williams then offered the guard £20 "in an attempt to bribe" him to be allowed inside, said the prosecutor.
Again, he was told to wait his turn.
Instead he went back to fetch a metal barrier and walked forward carrying it towards people.
He refused to let it go despite requests by security staff and even lifted it over his head.
Eventually, the security crew and several customers managed to wrestle the barrier off Williams and police were called and the defendant was arrested.
The court heard the first security man suffered a back injury and a bleeding nail.
Officers searched him and found a bag containing white powder, which turned out to be cocaine.
In a victim personal statement the injured security guard said he suffered severe back pain from the incident that night.
Because of his drug-fuelled actions he couldn't do household chores nor enjoy hobbies like hill walking and taking exercise.
His self-esteem has suffered and he's on anti-depressants.
But the court heard that Williams, a grounds worker, had behaved out of character.
Elen Owen, defending, said he had been badly affected by the death of his father during the Covid pandemic. He had only been able to see him two days before he died.
In his grief, he had taken to drink but a friend ill-advisedly suggested he take cocaine and he stupidly did so, she said.
Williams is "deeply sorry" for the distress he has caused.
The judge Her Honour Nicola Saffman said he rammed the metal barrier forward "with as much force as he could". It had taken three people to restrain him.
But she accepted he is genuinely appalled by what he did. He is normally a hard-working man.
She ordered that he pays his victim £1,000 compensation. He must also pay £530 costs and a £156 statutory surcharge.
For possession of the cocaine, he received a one-month, suspended jail term which is concurrent to the main 12 month, suspended term for affray.