Secret documents reveal New Zealand has shared intelligence collected through covert surveillance with Bangladesh.
The surveillance has been used to aid the United States as part of its global counter-terrorism campaign, launched after the September 11 attacks in 2001.
The Herald analysed the documents in collaboration with US news website The Intercept, which obtained them from the NSA whistle-blower Edward Snowden.
The documents shine light on the major role played by New Zealand's Government Communications Security Bureau (GCSB) in electronic spying operations conducted in Bangladesh.
The Bangladesh spying is revealed in an April 2013 US National Security Agency (NSA) report about its relationship with New Zealand.
In a section called "What Partner Provides to NSA", it says "GCSB has been the lead for the intelligence community on the Bangladesh CT [Counter-Terrorism] target since 2004."
The GCSB provides "one of the key SIGINT [signals intelligence] sources of [Bangladesh counter-terrorism] reporting to the US intelligence community."
The intelligence gathered by the GCSB staff was also being forwarded to foreign intelligence agencies, including Bangladesh's state intelligence agency.
A New Zealand government source told the Herald that Bangladesh is the main focus of one of the GCSB's four analysis sections, called ICT, and has been for over a decade.
ICT, the Transnational Issues section, was set up in April 2002 in the wake of the September 11 attacks to focus on terrorism threats.
The Bangladesh project appears to have begun in 2003, under Prime Minister Helen Clark, at a time when her Government was receptive to US war-on-terror requests following refusal to join the invasion of Iraq.
The "NSA Relationship with New Zealand" document gives the starting date as 2004. But a NSA officer wrote a briefing paper about the GCSB in December 2003 that noted the GCSB was "contributing to the War on Terrorism by reporting on the activities of Islamic extremists in Asia and the Pacific region and specifically taking on Bangladesh and Burma."
Another intelligence document from 2009 gives detail on how the Bangladesh spying occurs. The document states that staff within a GCSB unit are involved in planning the surveillance. It appears the GCSB does not directly conduct the interception and instead uses surveillance equipment provided by an allied agency.
The 2009 document reveals that there is a special collection site in the Bangladesh capital, Dhaka, for eavesdropping on local communications.
New Zealand does not have a high commission or any other official building in Bangladesh in which to hide a covert listening post. The Snowden documents suggest the Dhaka unit may be located inside a US-controlled building with operations overseen by the NSA and the Central Intelligence Agency (CIA).
The 2009 report said that "Internal GSM [mobile phone] collection is continuing with the extension of the Dhaka F6 environment survey." F6 is a designator used to refer to a joint CIA/NSA unit known as the Special Collection Service, which eavesdrops on communications from US embassies and consulates.
The report said the covert listening post was mostly being used by the GCSB to intercept mobile phone calls.
The intelligence gathered by the GCSB staff was being forwarded to foreign intelligence agencies. The April 2013 NSA report said the "GCSB's Bangladesh CT [counter terrorism] reporting provided unique intelligence leads that have enabled successful CT operations by Bangladesh State Intelligence Service, CIA and India over the past year".
It is unclear from any of the NSA documents whether New Zealand sought or received any assurances from Bangladesh over how intelligence it shared could be used for detentions and interrogations, or whether there was any effective oversight of how the country's agencies ultimately used the information.
But the documents do reveal that the GCSB adopted a dual-edged approach, and while it was sharing the intelligence with Bangladesh's security agencies, it was secretly monitoring the internal communications of the Rapid Action Battalion (Rab).
The report contained an intercepted image of a Rab officer speaking on the force's internal video conference system. It said that "Rab has been an active target for the GCSB in the past and this information could well be of high interest for future operations if the domestic security situation in Bangladesh were to deteriorate".
Bangladesh has low levels of terrorist activity compared with many countries in that region, is remote from New Zealand and there is no suggestion that the GCSB work was in response to any direct threat to New Zealand.