Footage of a stomping and stabbing attack on a prisoner has been played to murder trial jurors.
Riki Wiremu Ngamoki, Lopeti Telefoni and Paul Simon Tuliloa have pleaded not guilty to murdering Blake John Lee at Auckland's Paremoremo prison.
The footage showed inmates milling about the yard in March last year before an onslaught of punches, dozens of shankings and then repeated stomping on Lee.
It also showed prison staff running towards the yard and then watching the violence for about 80 seconds before entering.
A fourth man, who has name suppression, stabbed Lee 31 times in the upper body with a shank.
Lee was also stabbed in other places, including the groin.
One attacker leapt into the air multiple times before landing feet first on Lee.
Prosecutor David Wiseman said Telefoni stomped on Lee with his left foot and the man with name suppression stomped on Lee with his right foot.
The man with name suppression stomped on Lee's face at least six times.
Lee was stabbed in multiple frenzies.
At one point, his attacker changed his grip on whatever weapon he was wielding.
The footage lasted about three minutes and at one point a vivid red patch appeared on Lee's torso.
Even after this, Lee was stabbed at least three more times.
During the frenzied attack, another inmate appeared to try to protect Lee, who lay motionless and bleeding on the ground.
The man who tried protecting Lee then took his own shirt off in an apparent bid to stem Lee's bleeding.
Wiseman said Ngamoki and Tuliloa touched arms briefly and put their arms around each others' backs.
The three prisoners on trial, aged 20 to 24, have admitted injuring Lee with intent to injure.
Telefoni's defence counsel Emma Priest said Corrections staff entered the yard with pepper spray.
Priest said the man with name suppression raised the shank to his own mouth twice before throwing it to the ground.
That attacker was pepper-sprayed and dropped to his knees.
Priest said medical staff then entered.
She suggested Telefoni at one point stomped towards Lee's head but did not connect.
"Its a stomp towards the face and it's not possible for you to be sure that the stomp connected."
Footage played to jurors also showed Corrections officers approaching the yard, then looking through the barriers, huddling together and pacing about before entering.
Based on footage played, it appeared that about 80 seconds elapsed before the officers entered.
It was not immediately clear why this much time passed before officers entered.
The trial before Justice Simon Moore and the jury continues.