The last of five teenagers convicted of assaulting the Flaxmere man Kelly Donner before he was murdered has been sentenced to four years and two months imprisonment for his role in the attack.
Eastlee Harmer-Gemmell, 17, can also be named for the first time after his name suppression was lifted.
Harmer-Gemmell's co-offender, 14-year-old Haami Hanara, was convicted of Mr Donner's murder last week.
Harmer-Gemmell was 16 and on bail for another assault charge when the attack on Mr Donner took place on 4 March in Flaxmere village.
The first attack took place nearby on 17 February, 2017 when he assaulted and robbed a person of their mobile phone.
Judge Mackintosh said the teenager assaulted the victim because he was "wearing the wrong colour to the gang you are affiliated with".
While on bail for the first attack, he breached his bail conditions by going into Flaxmere village on 4 March with the intent to steal alcohol with four other teenagers.
That was where the five youths encountered Kelly Donner and got into a fight that culminated in him being stabbed four times by Hanara.
"There is no suggestion you were involved in that [Kelly Donner's murder] but you assaulted him with bits of broken concrete, broken wood and bottles ... and then attacked him when he was vulnerable, lying on the ground. He received kicks to his head."
Judge Mackintosh gave a starting point of eight years for Harmer-Gemmell's role in Mr Donner's death, but gave a discount for his youth, guilty plea and the difficult start the teenager had in life.
Crown prosecutor Steve Manning said it was concerning that in both attacks the victims were "stomped on" and had "kicks to the head."
Harmer-Gemmell's lawyer Kirsten Monk made an application for his name suppression to continue because of the hardship it would bring to his family if it were discontinued.
But Judge Mackintosh said there were no exceptional circumstances that warranted this.
"Sadly, in this case there is collateral damage."