Footage captured by a prison officer's body camera shows his colleague kicking a prisoner in the head as he lay on the ground.
The footage was played to a jury at the High Court in Auckland where two Corrections officers are accused of kicking and breaking the prisoner's ankle.
Desmond Fa'afoi is charged with injuring a prisoner and Wiremu Paikea with causing grievous bodily harm.
A third officer, Viju Devassy, is charged with attempting to pervert the course of justice by turning a security camera away from the violence. All three have pleaded not guilty.
Detective Sergeant Steve Brewer reviewed the footage captured by the body camera and other fixed security cameras around Paremoremo prison as the police investigated how prisoner Mitai Angell was left with a compound fracture to his ankle and leg.
He said the footage captured on Viju Devassy's body camera in May last year showed his fellow Corrections officer Desmond Fa'afoi approaching Angell as he lay on the ground.
"The 'Des' calls coincided with the first two kicks by Corrections officer Fa'afoi. An unknown Corrections officer says 'camera, camera'," said Mr Brewer.
Crown prosecutor David Wiseman said the footage showed Mr Devassy trying to restrain Mr Fa'afoi's leg, in an attempt to stop him kicking Mr Angell.
The recording also captured a voice.
"You'll be able to hear on the footage the words: 'Des, enough, enough, enough, enough, enough' in response to the kicks. As well as the words: 'Camera, camera'," said Mr Wiseman.
Another piece of footage captured on the prison's security cameras shows another Corrections officer Wiremu Paikea crouching at the legs of Angell.
The officer appears to be struggling. When he gets up and moves away, Angell's foot appears to be unnaturally at right angles from his leg.
A third piece of footage, which is not allowed to be broadcast, shows prison officer Viju Devassy in the control room of Bravo Block using the equipment. The Crown said he was adjusting the CCTV camera, moving it away from the action.
How it unfolded
Desmond Fa'afoi was attacked as prisoners were returning from the recreation room. The prisoners were being patted down when Trent Wellington attacked Mr Fa'afoi.
Crown prosecutor David Wiseman said prisoners Mitai Angell and Samuel Junior Hutchins joined in.
"Mr Fa'afoi fell to the ground. Angell and Hutchins then stood over him and struck his head numerous times with shanks which are improvised weapons made by prisoners which frequently feature a blade," said Mr Wiseman.
They repeatedly stabbed Mr Fa'afoi about the head and neck.
Former prison officer, now police officer Sophie Stevenson, saw the attack unfold and tried to tackle Wellington.
"As I tackled Wellington, I looked to my left and I saw Des, Desmond Fa'afoi, with two prisoners kind of on top of him - Angell and Hutchins - and they were both swinging at his head and neck area. I saw a lot of blood on the back of Des' head," she said.
Ms Stevenson ran to help Mr Fa'afoi and grabbed the prisoner Hutchins, pulling him away.
She said Hutchins punched her in the face and pushed her.
Mr Wiseman said back-up arrived and the prisoners were restrained but despite that Corrections officers used excessive force as Mr Angell was lying on the ground.
"At this point, the Crown alleges that the defendant, Mr Fa'afoi, kicked Mr Angell in the head three times."
[h] Jurors urged to put sympathy aside
Mr Wiseman acknowledged the jurors may feel sympathy towards Mr Fa'afoi - saying he worked in a very difficult and at times scary environment. But he urged them to put any feelings of sympathy aside.
Mr Fa'afoi's lawyer Todd Simmonds said his client never intended to injure Angell.
"Multiple blows to his head, stab wounds, cuts, abrasions, bleeding and the effect that that had on him...and 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?"
Mr Paikea's lawyer, Aaron Perkins QC, said his client was wrestling with Angell's legs.
"In a nutshell, Mr Paikea, my client, was simply doing his job, in very difficult circumstances, to the best of his ability."
Mr Devassy's lawyer Paul Borich QC said his client had been attacked by prisoners the year before.
He said the attack left an impression on his client and he read extracts from his client's interview with the police.
"It's all panic and rush at that time. To be honest ... for me just seeing Des, that was enough because it sort of...brought back whole heaps of flashbacks for me, like I was just seeing myself."
He said his client moved the camera to check to see if there were other prisoners around - it was not to pervert the course of justice.
The trial, before Justice Gordon and a jury, continues.