There may be a time and a place for seclusion and restraint in prisons when an inmate threatens to harm themselves or others and alternatives are unavailable.
There is however no justification in a civilised society for holding a child, a young person or a mentally unwell person in isolation.
Yet that is what New Zealand continues to do, and do a lot, despite the practice being widely condemned and frequently in breach of international standards.
The scale of seclusion and restraint in New Zealand has been documented in a report by Dr Sharon Shalev, an Oxford University criminologist. She was asked by the Human Rights Commission for an independent perspective on the practices and to recommend improvements.
Her findings are depressing and concerning, all the more so because the penal environment seems little changed since previous reports urged a reduction in the use of seclusion.
Even then Shalev notes she cannot be certain that her findings present the whole picture because of poor record-keeping.
In the course of her inquiry, Shalev visited 17 places, including prisons, hospitals, children's homes and police cells.
Data provide by Corrections showed there were there were 16,370 recorded instances of segregation in the year to last November.
In the health area, 1000 people were secluded in 2015 and while total numbers of young people confined to secure units was not collated, data included in the report shows that some children were confined for as long as 11 days.
Even the existence of secure units for children was unacceptable, Shalev found, as "international human rights law and principles of good practice call for a complete prohibition on the use of solitary confinement with children".
The takeaway from the report that the level of seclusion and restraint in New Zealand prisons and health care facilities is too high and too widespread.
Maori are overrepresented in the isolation units, a finding Shalev calls concerning and requiring further investigation.
She urges an end to "tie down" beds in prisons and restraint chairs in police cells, calling them "inherently degrading".
The units used to isolate individuals were, she found, stark and impoverished, sometimes lacking access to drinking water, a toilet or an alarm system for help.
Basic entitlements such as daily showers or outdoor exercise were not always available. Family visits, televisions, books or craft sets which all could help relieve the psychological effects of solitary confinement were absent or limited.
In mental health settings, Shalev found that some patients faced long-term restrictions, with their management focused on seclusion rather than clinical treatment that could relieve them from confinement.
The report presents a challenge to managers of penal and health institutions. Its recommendations are hardly radical, advocating a significant reduction in the use of seclusion because the evidence demonstrates that it is bad for people's health and well-being.
By their nature prisons and other places which limit liberty are tough environments. But those confined by the criminal justice system or mental health problems should expect that their basic human rights are respected.