In a case of mistaken identity, Isaac Broughton leapt from his car pointing a loaded shotgun and shouting profanities.
Twenty-six-year-old Shon Wanahi died in Auckland's Middlemore Hospital an hour later, with the shotgun pellets shredding his lungs and spleen.
It was an emotional scene in the High Court at Auckland on Friday as Broughton, 29, was handed a life sentence with a minimum non-parole period of 12 years for Mr Wanahi's murder at the Papakura Railway Station in March last year, along with wounding Bunji Fenton, 28, in the same incident.
"Aroha from our whanau to yours," a woman wept loudly from Broughton's half of the public gallery to the victim's as Broughton was led away.
Members of Mr Wanahi's family simultaneously broke out singing "lay down my brother".
Earlier Mr Wanahi's partner, Lesila Taufa, in a statement read to the court described the way the killing had left her and their children, aged two to five, "lost".
Their eldest had stopped speaking at school, she said.
"When we go past the spot where Shon was shot, he gets upset and cries."
The court heard Broughton, a former gang member, had leapt from his car with the shotgun, mistaking the men for friends of his, shouting "what's up motherf***er" - seemingly as a joke.
On Friday, prosecutor Evan McCaughan called Broughton's actions on the night "exceptionally dangerous" and said the risk someone would be harmed was extremely high.
Unsure how serious Broughton - a complete stranger to them - was, the men, members of another gang, moved towards him while he jumped back into his car.
Mr Fenton began to punch Broughton through the car's window until the gun fired, seriously injuring his bicep.
Broughton fired another shot seconds later that hit Mr Wanahi in the back, prosecutors said.
The defence called for a lighter sentence, arguing the shotgun only went off while Broughton was trying to flee while under a sustained attack from Mr Fenton.
But Justice Geoffrey Venning said while he accepted Broughton had tried to withdraw initially, he had been carrying the shotgun with the intent of using it to defend himself against former gang associates and instigated the situation.
The lack of serious injuries he received on the night suggested the beating may not have been as serious as made out, he said.
The judge also factored in Broughton's history of criminal offences, including an aggregated assault conviction, into the punishment.