A lawyer for a Corrections officer says his client was having flashbacks to the time when he was attacked by inmates.
Viju Devassy has been charged with attempting to pervert the course of justice by turning a camera away from the scene where his colleagues had a prisoner on the floor inside the country's maximum security prison, Paremoremo.
Viju Devassy's lawyer Paul Borich QC told the jurors in his closing address how his client was attacked by inmates in October 2016.
"That attack, given what you know now, had a very significant effect on him. It left a lasting impression."
Eight months later, in May last year, Mr Devassy was one of the first corrections officers on the scene when three inmates - two with shanks - attacked Corrections officers.
"He's down there running, you might think, on his instinct and his training ... until, as he said, he saw all that blood, until he started seeing himself, until he started having flashbacks. He wasn't 'up there'."
One officer, Desmond Fa'afoi, was repeatedly stabbed in the head and neck by inmates Mitai Angell and Samuel Junior Hutchins while inmate Trent Wellington punched another officer. Mr Fa'afoi was left badly injured.
"You 12 will not have encountered in your life, hopefully, the likes of the Angells and Wellingtons of this world. As you know from this trial, these are men prepared to make shanks - what a great word, shanks, we've even got a word for it... It's prison terminology. They make them out of bench tops and ceiling fan grills, they put handles on them so they can hold them and use them more efficiently.
"They plan coordinated, random attacks and they try and stab Corrections officers in the neck and the head."
He said while the lawyers in court could watch the security camera footage over and over, pause and closely examine every detail, the guards on the ground had to deal with the situation at hand and in real time.
"Just remember where you are and the circumstances and where those three men were and the circumstances faced by them. They were there in an uncertain and violent mess, you can see that. It was blood soaked and you can see that on the floor and on the walls and on the pictures. It was chaos."
Mr Borich said Mr Devassy was actually trying to do the right thing - he had tried to restrain his colleague Desmond Fa'afoi from kicking inmate Angell in the head.
He said his client had merely moved the camera to search for a third prisoner but was called away by another officer.
Another officer, Wiremu Paikea, is accused of putting inmate Angell in a figure-four leg-lock, breaking his calf bone and dislocating his ankle.
Mr Paikea's lawyer Aaron Perkins said Mr Paikea was merely trying to do his job in trying circumstances and slipped in blood while he tried to restrain the prisoner.
"How can you be sure that he, in those circumstances, actually consciously turned his mind to any appreciation of the risk to Angell's safety by grappling with his leg?"
Mr Perkins pointed to the evidence of the surgeon who cared for inmate Angell. Dr Schluter said he frequently saw people with the same injuries after they had slipped down a grassy bank or misjudged a curb while crossing the road.
Mr Perkins said a Corrections trainer told the court there was no need for a leg-lock at the time because Angell was under control.
But he pointed to security camera footage of the incident.
"All we can see for long periods, members of the jury, is a great deal of activity, bobbing up and down by prison officers, entirely consistent with them still struggling with this man.
"They're not bobbing up and down - my words - just for fun. And does it make any sense to you at all, members of the jury, that you would be seeing activity of this sort if he was just lying there with his hands behind his back? What on earth are the officers doing then?"
Mr Perkins said Angell had not given up but Mr Paikea had no intent to cause Angell harm.
The jury has retired to consider a verdict.