New Zealand's spy agency is refusing to release a copy of its deal with a foreign agency to run a secret operation out of this country.
The operation - that the Government Communications Security Bureau (GCSB) did not tell government ministers about - ran from 2013-20, but was only exposed by an official watchdog last month.
Intelligence documents strongly suggest the bureau hosted - but exercised virtually no oversight over - a system run by the US National Security Agency to help acquire targets classified as terrorists for killer drones, bombs and raids using GCSB data.
An important aspect of the deal document - called a memorandum of understanding (MOU), was that it dealt with concerns that arose within the GCSB about the system's military capabilities.
The Inspector-General of Intelligence and Security (IGIS) said the system was "largely controlled by the partner agency", even though the bureau could have vetoed operations it did not like under the MOU.
It chose instead not to keep track of them, the inspector-general's report last month showed.
The public report did not identify the foreign agency, and the inspector-general later told RNZ he did not ask if the system was used for military operations.
His report revealed the MOU was signed with the foreign agency in March 2012 by a GCSB deputy director.
An internal GCSB document from 2012 showed it signed an MOU with the NSA that year to host the APPARITION system.
RNZ requested a copy of the MOU under the Official Information Act, but the bureau withheld it.
"The GCSB worked closely with the IGIS to release as much of the MOU as possible in the public IGIS report," director-general Andrew Clark responded.
"I am confident that the IGIS report balances accountability with the need to protect New Zealand's national security interests. To continue to protect these interests, I am therefore refusing your request."
The grounds for refusal was that releasing the MOU would likely prejudice security or defence or international relations, and prejudice how information was entrusted to the government "on a basis of confidence by the government of any other country or any agency of such a government".
This latter ground was not often cited in OIA refusals.
The IGIS report said the MOU "does not appear to classify as an international agreement, as this is concerned with international treaties or the like".
"The decision to host the capability on the terms set out in the MOU was significant, particularly given the potential uses of the capability to support military operations," said the inspector-general report.
The MOU was poorly implemented, it said.
A subsequent policy requires the bureau to get ministerial approval for an international agreement that deals with new policy. The inspector-general said this should be triggered if the bureau looked at a hosting deal like this again.