Senior psychiatrists have detailed widespread problems, including assaults and violence, in secure units for intellectually disabled people who have committed crimes.
The psychiatrists say under-funding, insufficient beds, lack of access to the care needed, and violence among patients are common.
In a letter to the Ministry of Health in May, Jeremy Skipworth, of the Auckland Regional Forensic Psychiatry Services, and Nigel Fairley, of Capital and Coast District Health Board, said the situation was neither appropriate nor sustainable for the patients who could not access services, for staff and for other services which were having to fill the gaps.
They said there was "a serious and in some areas imminent risk of harm", and a comprehensive independent review of the intellectual disability care sector was needed.
In Canterbury, the risk of assaults had been serious enough for doctors to consider closing other mental health inpatient services, to provide back-up in case some staff refused to work because of safety concerns.
Under the Intellectual Disability (Compulsory Care and Rehabilitation) Act, the units deal with:
The psychiatrists' letter said these were "some of the most disadvantaged and vulnerable populations of healthcare recipients".
But there was a "manifestly inadequte number of assessments and care and rehabilitation beds" for people who were under, or arguably should be under, the Act.
Dr Skipworth said in the northern region, managed by Waitemata DHB, there were not enough "step-down beds", which provide bridging support between secure hospital care and the community.
"The risks in this process have been exposed by a number of serious incidents at the point of transition," the letter said.
In the central region of the North Island, there was pressure from long-stay individuals who often did not return to their region of origin, creating "blocked beds".
In the South Island, Canterbury DHB chief of psychiatry Peri Renison said inadequate planning and resourcing meant secure beds were put in an assessment and rehabilitation unit, which had experienced repeated crises related to the risks from assaults.
"The levels of concerns in Canterbury are such that we are preparing to close other mental health inpatient services in case we need to divert staff from one service to another, should AT&R staff refuse to take the floor due to safety issues as [is] being advised by their unions.
"Alternatively, all patients would need to be transferred to police or another facility."
The letter is backed by Chief Human Rights Commissioner David Rutherford and Children's Commissioner Andrew Becroft.
Health and Disability Commissioner Anthony Hill said he wanted to hear from the ministry on the issues raised and the actions it had taken and planned to take.
Health Ministry director of service commissioning Jill Lane said it had put in place measures to meet acute demand while a longer-term solution was put in place.
She said the ministry had been able to manage growing pressure through regional responses and some "individual solutions". For example, it had been able to put in additional resources to continue with community placements or had looked to relocate people to other regions.
Ms Lane said a new national service was being developed for high-risk and high-needs offenders needing a secure, individualised placement. However a long-term solution was at least 18 months away.