A law change which means 501 deportees who offended before November 2015 will face parole-like conditions has passed under urgency.
Parliament ran an overnight session to pass the Returning Offenders (Management and Information) Amendment Bill, along with a bill extending cheaper road user charges.
Justice Minister Kiritapu Allan said the urgency was needed because the change was critical to protect public safety.
It was aimed at a vulnerability exposed in December, when a former drug dealer deported from Australia won a case in the High Court.
It meant he and others whose offences were committed before November 2015 would not need to be assessed for rehabilitation or treatment, or give fingerprints and DNA to the police.
The judge found the current law was unclear about whether deportees who offended before the original law took effect on 18 November 2015 should face those impositions.
Allan said it would have meant there was no oversight of deportees returning to New Zealand.
"I consider that this situation amounts to an absolute unacceptable and urgent risk to public safety and is contrary to how Parliament always intended the Act to work," she said last night.
The amendment would carry out Parliament's original intention for the law, she said.
"This bill affirms what I consider to be Parliament's original intention of the returning offenders' regime. Consequently the bill only aims to put returning offenders in the general same position as they would have been had they offended in New Zealand.
"Parole is a normal part of our criminal justice system and the Bill only puts returning offenders in a similar position they would have been in if had they offended in New Zealand," she said.
The amendment means people who were convicted and deported to New Zealand before the cutoff date will face parole-like conditions and police would be able to collect identifying information from them.
Of the 265 returning offenders currently facing conditions, 41 fall into this category - and 21 of those are considered at high risk of reoffending or harming others.
Unlike most law changes concerning criminals, the change is specifically designed to apply retrospectively.