Parliament has passed a controversial police surveillance bill under urgency on Thursday.
The Government only secured the votes it needed at the start of the week after a parliamentary select committee made significant changes.
The Video Camera Surveillance (Temporary Measures) Bill, which allows police to secretly film suspects, passed by 105 to 14 with the Maori Party, the Greens and Mana voting against.
Mana Party leader Hone Harawira told Parliament the bill enables state agencies to invade the privacy of citizens.
The law change was sought after a Supreme Court ruling, made public in August this year, ruled that police acted unlawfully when they secretly filmed people in 2007. The ruling meant charges against 13 of the 17 arrested in the Urewera raids had to be dropped.
Following the court's ruling, Prime Minister John Key said urgent retrospective legislation was needed to side-step it, otherwise dozens of important police investigations would be scuppered.
Opposition from other parties forced the Government to refer the bill to the Justice and Electoral select committee for urgent consideration.
The select committee watered down the retrospective nature of the bill, meaning evidence gathered so far in the cases referred to by Mr Key will not automatically be deemed lawful.
It also decided that the new law will apply for six months, not the 12 months the Government sought.