The police have been publicly rebuked by Police Minister Anne Tolley for their "monumental cock-up" in failing to administer oaths properly for sworn officers.
Parliament passed a new law under urgency last night retrospectively validating the unlawful oaths of 63 police who returned to the force in the past four years.
Without the retrospective law, any actions by those officers - including searches, arrests and prosecutions - would have been open to legal challenge on the grounds that they had not been properly sworn in.
Under changes to the Policing Act in 2008, oaths sworn by returning officers had to be administered by the Commissioner of Police or a person authorised by him instead of by district commanders or inspectors.
Mrs Tolley said she was not going to make any excuses for the police.
"This is a monumental cock-up by the police," she said. "I'm really disappointed and I'm embarrassed and I've got to sit in the House and I've got to take the scorn that is being dished out in there.
"This is a top-performing organisation that I expect top performance from and this is less than that."
She said Commissioner Peter Marshall had been very apologetic.
The error was discovered by a human resources staff member and the minister was alerted in September.
Crown Law advised the government that the police were exposed to the risk of legal challenge unless validating legislation was passed.
What made matters worse is that similar retrospective legislation had to be passed by Parliament when Judith Collins was Police Minister because the oath was not being correctly administered to graduates from the Police College.
The legislation passed yesterday, the Policing (Constable's Oaths Validation) Amendment Bill, was supported by all parties in Parliament.
The bill pushed other Government bills off the agenda including the final reading of the Telecommunication (Interception Capability and Security) Bill, the companion bill to the GCSB law changes passed recently.
Parliament rose last night and has a recess next week. Then only five sitting weeks remain this year.
Last night, the police refused to indicate the level of exposure the blunder had created, such as revealing how many arrests the 63 officers had been involved in.