Jurors have been told another prisoner, who has name suppression, then stabbed Lee with a shank dozens of times in the Paremoremo prison attack.
Ngamoki today elected to call evidence in his own defence.
He has admitted intentionally injuring another prisoner called Cesar Su'a during the same outburst of violence in which Lee was killed.
Defence counsel Nicola Manning said when Lee was killed, Ngamoki was a 20-year-old prisoner.
"He spent 23 hours a day locked in his cell. He had no control over who else was in the yard."
Manning said Ngamoki was carefully searched upon release from his cell.
But she said another inmate, the one with name suppression, was not so closely checked.
"Quite remarkably, he managed to arm himself with a weapon and take it into the yard."
Jurors have been told members of different gangs were in the yard and Manning said security footage showed Ngamoki and Su'a eyeing each other up.
Su'a and Lee were walking side-by-side, and Telefoni has said both were Mongrel Mob members or associates.
Manning said Ngamoki's back was turned when Telefoni punched Lee, and Su'a then moved towards Ngamoki.
She said Ngamoki and Su'a had a "simultaneous exchange" of punches before the two ended up grappling.
The defence counsel said this conflict was not aimed at neutralising Su'a so other inmates could attack Lee without any chance of Su'a intervening.
"Mr Ngamoki's knowledge and intention are the key issues in this trial."
Jurors heard from psychologist, convicted murderer and former maximum-security prisoner Dr Paul Wood.
He gave evidence about "fight, flight or freeze" stress responses.
"It's the response that kicks in before the thinking part of your brain is actually processing information."
Wood outlined various stressful situations where this response could be triggered.
Tuliloa's barrister Gary Gotlieb asked Wood if people could just "snap out" of these modes and Wood said people could not.
Gotlieb asked if prison guards opening a yard entrance could stop fighting by yelling at the fighting inmates.
Wood said it was unlikely they'd be able to.
CCTV footage has shown prison staff running towards the yard and then watching the violence for about 80 seconds before entering.
The trial before Justice Simon Moore and the jury continues.