New legislation governing New Zealand's spy agencies has been passed by Parliament.
The Intelligence and Security Bill affects the Government Communications Security Bureau (GCSB) and the Security Intelligence Service (SIS).
It removes the restriction on the GCSB intercepting New Zealanders' communication.
But that would have to be signed off by the Attorney-General and the Commissioner of Warrants - and could only be for the purposes of "national security".
The legislation will create a two-tier system for all of the agencies' activities, and require them to follow the same warranting and compliance regime.
It will also allow the agencies to access personal information held by government departments and private companies.
However, the bill makes the agencies subject to the Privacy Act and lays out specific guidelines for how such information is accessed.