A thug brutally attacked a stranger who he wrongly believed was hassling two girls.
Kristopher Haig pounced on Robert Hamilton at a bus stop in East Kilbride last June 12.
While on bail, the 31 year-old stabbed James Burns with a broken bottle after the pair got into a fight in the town.
READ MORE: Paisley woman, 29, who screamed 'yes' after murdering man faces life sentence
Haig now faces a lengthy jail-term after he appeared at the High Court in Glasgow.
He pled guilty to assaulting Mr Hamilton to his severe injury and danger of life.
Haig further admitted attacking Mr Burns to his injury. He will be sentenced next month.
The court heard how Mr Hamilton had been waiting for a bus home in East Kilbride's Lickprivick Place when Haig struck.
Haig - under the influence of drink and street Valium - started hassling the man, who initially tried to ignore him.
But, prosecutor Chris McKenna said: "Haig punched and pushed him causing Mr Hamilton to fall and strike a lamp-post.
"Haig then repeatedly kicked the man and stamped on his head."
Police turned and spotted the thug still standing over his now unconscious and heavily bleeding victim.
Mr Hamilton suffered a fractured skull, bleed on the brain as well as a wound near his eye.
The court heard the victim's life was at risk if the brain injury got worse.
He had fortunately made a full recovery from his ordeal.
Mr McKenna: "Mr Hamilton has told police that he must have been in the wrong place at the wrong time.
"This was a random, violent attack on an unknown person which could have resulted in a much more serious outcome."
Haig was then bailed from Hamilton Sheriff Court on June 14.
On July 16, he was then with Mr Burns in Franklin Place, East Kilbride when they started arguing.
READ MORE: Glasgow man dumped hundreds of tyres that caused fire so big it disrupted airport flight path
Raging Haig grabbed a gin bottle from a bin, smashed it before repeatedly thrusting it into this victim's stomach.
As the attacker fled, the injured Mr Burns managed to stagger to a woman's house.
She said she was dialling 999, but Mr Burns urged: "Please don't - he is too evil."
However, the woman did later call for help. The court heard the victim suffered three wounds to his torso.
Haig was soon traced and held for the attack.
Regarding the attack on Mr Hamilton, his lawyer Ann Ogg said: "He was under the impression two girls at the bus stop were annoyed by the man.
"He now realises that was not the case and that he made a mistake."
Lord Beckett remanded Haig in custody and adjourned sentencing for reports.