Keil, Telea, Soames, and the man with name suppression face additional charges of riotous damage and arson after allegedly damaging property and lighting fires in exercise yard 116.
Ronaki also faces a charge of threatening to kill a prisoner who left the alleged rioting group on the morning of December 30.
Six others have previously pleaded guilty and are awaiting sentencing.
Hamilton explained to the jury how there were 21 prisoners in exercise yard 116, as part of their morning routine, the morning of December 29.
After just half an hour, “an issue” arose between nine of them and a Corrections Officer.
Initially just one or two became unco-operative and aggressive, which Hamilton said, wasn’t particularly unusual given the environment they were in.
It escalated to the point where other Corrections staff became involved for a time, but, from the perspective of the officers, it was resolved.
However, the hostility of the prisoners continued and a Code Blue was raised, before a Code Red was launched, which resulted in the lockdown of the whole prison complex.
The original group of nine - now reduced to four; Keil, Telea, Soames, and the man with name suppression - are then alleged to have begun damaging property in yard 116, including throwing wet rolls of toilet paper at security cameras filming their actions.
Wooden seats were broken into weapons and doors were ripped off hinges.
Fires were then lit and as Corrections staff tried to put them out with hoses the accused would hold up mats and doors, which were ripped off hinges, to prevent the fires from being extinguished.
Urine was also thrown at any staff who got close.
Hamilton told the jury they would hear evidence from Corrections staff who were subjected to disparaging and degrading comments throughout the ordeal.
The group of nine ultimately managed to escape from yard 116, climbing onto the portico ceiling, with two cutting a hole and getting onto the roof.
The other 12 prisoners stayed behind and didn’t take part in the riot.
Once the prisoners got out, they set about freeing members of a gang housed in the East North wing, using a battering ram to create escape holes.
Twelve prisoners were freed from their cells and eight of them joined the alleged rioters.
By that night, 25 fires would be lit, destroying one of the buildings.
“Those fires were not accidental,” Hamilton said.
“The numerous fires gradually took hold and took hold when other prisoners were locked in their cells in the east and west wings.
“The situation was ... obviously life-threatening and it became clear that the evacuation of the trapped prisoners was an urgent priority.”
Hamilton said it would become clear that Corrections staff effectively put their own lives on the line to risk to remove the prisoners safely.
“This experience was a truly terrifying one for everyone of them who still suffer stress and anxiety because of it ... and of course, the group involved in this rampage knew and understood the inmates were locked in their cells as the fires took hold.
“The risk to life was crystal clear to them.
“But it didn’t stop them.”
The jury was shown various excerpts from the substantial amount of CCTV and drone footage gathered for the investigation.
It shows one prisoner lighting fires, and the group standing on a roof, starting another fire of accelerant-doused furniture left as a trap to stop AOS and ACR staff from getting inside.
Drone footage showed the prisoners going through a smashed window, and setting it on fire after seeing Armed Offenders Squad and Control and Restraint staff walking inside.
Plumes of smoke are then seen pouring out the window, before the officers retreat outside, and the flames take off.
The following morning, the group agreed to surrender on condition that a kaumatua and Māori Party MP would be present on site.
Before climbing down, they performed a haka on the roof of the otherwise charred building.
“A tight group of 16 right till the end,” Hamilton told the jury.
The trial, before Justice Christine Gordon, is set down for 12 weeks.