Three prison officers have all been found not guilty of assaulting a prisoner in retaliation and perverting the course of justice.
Guards Desmond Faafoi, Wiremu Paikea and Viju Devassy have all been on trial in the High Court at Auckland for the past two weeks.
The trio were all working at Auckland Prison, Paremoremo, on May 20 last year when a group of inmates attacked them.
Faafoi was severely wounded in the incident and was stabbed several times in the head with a shank (a makeshift knife).
Police charged the three prisoners who instigated the attack, Samuel Hutchins, Trent Wellington and Mitai Angell, but also charged the three Corrections officers for their retaliation and actions afterwards.
Today, late in the afternoon and in front of a packed public gallery, the jury returned its verdicts.
Faafoi was charged with assault with intent to injure Angell after kicking the prisoner in the head three times.
He was found not guilty.
Paikea was charged with causing grievous bodily harm with reckless disregard after CCTV footage showed him kneeling down over the back of Angell's legs.
The Crown said Paikea deliberately bent Angell's ankle at a 90-degree angle causing a compound dislocation.
The jury found Paikea not guilty.
And Devassy was charged with wilfully attempting to pervert the course of justice after the Crown accused him of shifting a CCTV camera away from the incident.
He was also found not guilty.
Supporters of the men erupted in applause as the verdicts were read and the three guards were free to go.
They also clapped as the jury left the courtroom.
Crown prosecutor Jo Murdoch said Faafoi "reacted to violence with violence" and as he was "pumped up with anger and adrenalin, he lost control".
"He punched and kicked an inmate repeatedly to the point that he had to be restrained by his fellow prison officers," Murdoch said.
"He then collapsed due to injury and physical exertion ... He lashed out.
"Devassy saw this, it happened in front of him," Murdoch said.
"He clearly saw Mr Faafoi kicking Angell's head as Angell lay curled up in the fetal position. He clearly saw it 'cause it was recorded on his body camera."
Earlier in the trial the court was shown the CCTV footage of the incident.
The video shows Wellington being wrestled by a Corrections officer near a stairwell, before Hutchins is tackled by Faafoi.
Faafoi can be seen bleeding heavily from his stab wounds, while blood is soon smeared and splattered over the walls.
Angell is wrestled to the ground before more Corrections officers, including Devassy, come to help restrain the prisoners.
A voice from an unknown Corrections officer during Devassy's body camera recording of the incident as Faafoi lashes out against Angell.
"Des[mond], Des, enough, enough, enough, enough ... camera, camera," the voice says.
Faafoi's defence counsel Todd Simmonds argued his client, who had just suffered a vicious attack, had no malicious intent to injure the prisoner.
"Multiple blows to his head, stab wounds, cuts, abrasions, bleeding and the effect that had on [Faafoi]," Simmonds said.
"His ability to think straight, to appreciate what he was doing at the time - that's the defence.
"He may have lashed out, you'll see that on the footage, but did he have the intent?"
The Crown said Paikea had effectively snapped Angell's ankle, despite the prisoner already being subdued.
But Paikea's lawyer Aaron Perkins QC said the injury occurred while the guard was wrestling with the struggling inmate and rejected any criminal intent or reckless disregard.
"[Paikea] was simply doing his job in very difficult circumstances to the best of his ability," Perkins said.
Devassy accepted redirecting the CCTV camera but denied it was to hide the incident from the camera's eye.
His lawyer, Paul Borich QC, said the Corrections officer was actually trying to preserve justice and "locate other rogue inmates" who may have been a threat to other guards.
Borich told the jury the world of the courtroom was a long way from the world inside the prison's walls.
Devassy had already been the victim of an inmate attack during an October 2016 incident, the court earlier heard.
The trio of officers were all suspended after the charges were laid.
The three prisoners have all pleaded guilty to wounding with intent to cause grievous bodily harm and aggravated assault and will be sentenced later this year.