Parliament has passed laws to keep dangerous sexual and violent offenders locked up for longer.
On Thursday, the Public Safety (Public Protection Orders) Bill passed its third and final reading alongside the Parole (Extended Supervision Orders) Amendment Bill.
The law changes will allow the Department of Corrections to renew supervision orders for high-risk sex and violent offenders for as long as needed. The High Court will also be able to detain high-risk individuals using a public protection order, until they no longer pose a serious and imminent threat to public safety.
Corrections Minister Sam Lotu-Iiga told Parliament the two bills would better protect New Zealanders from the country's worst offenders.
"Together these two bills fill the gaps we've identified in managing high-risk offenders once there are no custodial options."
Labour MP Phil Goff said a small number of offenders still posed a risk after doing their time.
"We're not talking about a large number of people. We're talking about maybe five to 12 people over a 10-year period. So about one to two people a year."
He said he never lightly supported legislation that breached the New Zealand Bill of Rights Act.
But, Mr Goff told Parliament, in this case the rights of the people who would almost certainly become victims came first.
Green Party MP David Clendon told the House detaining high-risk offenders who had finished their sentences went too far.
"It's excessive. We think it is unwarranted and it ignores other options which could achieve the same ends of enhancing public safety without compromising our commitment to human rights, both domestically and in the context of international law."
But New Zealand First MP Denis O'Rourke said the laws achieved a very difficult balance between protecting citizens from serious sexual or violent harm and from people who are likely to reoffend following release from prison, and the rights of those affected by the order.
Under the laws, individuals who are subject to a public protection order would live in a residence on prison grounds, separate from the main buildings.
Offenders on extended supervision orders would also have their contact with children strictly controlled.
Listen to the story