Corrections Department head Barry Matthews says he cannot guarantee inmates will not be hurt by other inmates.
Mr Matthews was asked by the law and order select committee today about recent deaths in prison.
Tue Faavae, 23, was found dead in a cell block at Auckland Prison at Paremoremo about 11am on Sunday. He was serving a sentence for aggravated robbery.
Mr Matthews said there were 261 prisoners at the jail and only six were allowed out of their cells at a time.
A special unit involving unions was set up to look at equipment, procedures, and staffing in prisons as a response to an increase in assaults on staff and prisoners nationally , he said.
At Auckland Prison's east wing a specific safety project was run.
It included measures such as polycarbonate sheeting on cell doors and reducing how many inmates were allowed out of their cells at any one time.
Inmates were unpredictable, volatile and violent, and incidents could flare up in a moment, he said.
"There's no guarantees in this... The only way we can guarantee a prisoner is not attacked by another one is to have effectively solitary confinement of everybody."
Mr Matthews was asked about a Resource Management Act issue where prisons could not erect fences capped with razor wire without seeking fresh consents.
If such a fence was put around a work site facility at Springhill - in the north Waikato - where a man recently escaped it would be very difficult, he said.
"We had to spend millions of dollars to put trees and plants around so people couldn't see the prison to meet the Resource Management and Environment Court requirements there."