Three teenage boys have been sentenced for an unprovoked attack on a man at a tram station in Greater Manchester.
The victim, 49, was assaulted by the two 15-year-olds and a 16-year-old at Freehold in Chadderton on 8 March.
The attack only ended when the driver and passengers from a tram which had stopped on the other side of the tracks ran to his aid.
Sentencing the boys at Manchester Crown Court, Judge Bernadette Baxter said it was "only luck that saved" the man.
She said it was a "prolonged, vicious and sickening attack" which could have killed the victim.
One of the 15-year-old boys, who the court heard landed the most blows, was sentenced to six years in a young offenders institution.
Judge Baxter said there was no sign he would have stopped if the arriving tram had not pulled into the station.
He pleaded guilty at an earlier hearing to inflicting grievous bodily harm with intent and two counts of assault occasioning actual bodily harm.
The teenager had also committed two separate assaults on members of the public on the Metrolink route the previous month.
The 16-year-old and the other 15-year-old were each sentenced to five years in a young offenders institution after they admitted inflicting grievous bodily harm.
The victim, who has now recovered from his injuries, suffered a bleeding behind his eye, a broken nose and bruising.
The court heard the assault has left a "profound and life-changing" affect on him.
Det Sgt Alex Brown said the teenagers "subjected an innocent man to a relentless, brutal and shocking attack for no reason other than because they felt like it".
"They gained enjoyment from beating a man to the point where he was unconscious and was unable to defend himself," he added.