Legislation allowing Government Communications Security Bureau to carry out surveillance on New Zealanders has passed its third and final reading in Parliament.
The Government Communications Security Bureau and Related Legislation Amendment Bill was passed by 61 votes to 59 with the support by United Future and the ACT party at 7.45pm on Wednesday.
The Maori Party, which opposed the bill, was able to cast only votes for two of its three MPs in Parliament meaning only 59 votes could be cast in opposition, rather than 60.
Earlier, the Prime Minister told Parliament that if he disclosed all he knew about threats to the country, it would cut dead some of the opposition to the bill.
John Key told Parliament the country faced very real threats but he could not reveal them for security reasons.
He said the bill was good legislation and its provisions were necessary for national security.
"They're needed right now, because there are threats against us right now! Others may play politics with this security and the lives of New Zealanders but I can not, and will not, do so."
Mr Key said he'd rarely seen so much misinformation and conspiracy about legislation.
But Labour leader David Shearer told MPs the bill does nothing to reassure New Zealanders their private lives are safe from prying eyes.
"This is a sad day, we are passing legislation that is ad hoc, that is Mickey Mouse, where you have to have a third reading to explain exactly what the bill will do."
Mr Shearer told Parliament the Government should have only passed the bill after a full and independent inquiry he described it as loose law which would leave people looking over their shoulders.
The opposition did its best to delay the bill, arguing it will open the door to wholesale domestic surveillance.
United Future leader Peter Dunne said he is comfortable over his support for the bill. He said it's a complex bill and its intent could have been better communicated to the public.