Gareth Robert Ferguson, 40, of Dunedin pulled out the large knife and stabbed Black Power gang member Allan Kukutai once during an altercation in the Octagon about 1.40am on February 18 last year.
The attack left Mr Kukutai with serious injuries, including lacerations to his liver and lungs.
The stabbing followed three years of ongoing tension between the two gangs.
For a city the size of Dunedin, those tensions were "far too pronounced", Judge Michael Crosbie said during sentencing in Dunedin District Court yesterday.
Ferguson earlier admitted an indictably laid charge of injuring Mr Kukutai with intent to cause him grievous bodily harm. The charge had been reduced from one of wounding with intent, on which Ferguson was going to trial.
Judge Crosbie agreed with Crown counsel Marie Grills the use of a weapon, the seriousness of the violence, given the level of injury, and the gang warfare context made the matter particularly serious.
Mrs Grills argued the attack was in the nature of a vigilante action and an end sentence of just over five years was warranted.
But defence counsel Anne Stevens said it had not been premeditated or in the nature of a vigilante action. Ferguson had not left home looking for Mr Kukutai. It had been a chance meeting but he accepted he stabbed Mr Kukutai because that was part of gang behaviour.
Judge Crosbie agreed the act was part of gang warfare, that Ferguson had singled out Mr Kukutai for no other reason than he was a member of another gang.