New Zealand intelligence is spying on its neighbors throughout the Asia-Pacific region, intercepting mass data and sharing it with the National Security Agency in the United States, according to documents leaked by NSA whistleblower Edward Snowden.

The Government Communications Security Bureau (GCSB), New Zealand’s intelligence agency, has been targeting island nations such as Tuvalu, Nauru, Kiribati, Samoa, Vanuatu, the Solomon Islands, Fiji, Tonga and France’s overseas territories New Caledonia and French Polynesia, according to the Intercept.

Each of those small nations and territories maintains friendly relations with New Zealand.

— Bryce Edwards (@bryce_edwards) March 4, 2015

The GCSB collects data at a spy station in New Zealand’s Waihopai Valley. That data is shared through an NSA surveillance system called XKEYSCORE, which analyzes vast amounts of emails, internet browsing sessions and online chats intercepted from 150 different locations worldwide, the Intercept reported.

The spying was a part of New Zealand’s role in “Five Eyes,” a surveillance alliance that includes electronic eavesdropping agencies from New Zealand, the US, the United Kingdom, Canada and Australia.

Vincent Yu, File A TV screen at a shopping mall in Hong Kong shows a news report of former CIA employee and NSA whistleblower Edward Snowden.

While the GCSB runs the smallest operation among the five members of the spy coalition, the agency is viewed as an important player because of New Zealand’s location in the world. It is responsible for monitoring communications in the South Pacific as a part of Five Eyes’ global surveillance efforts, according to documents.

One NSA memo notes that New Zealand provides “valuable access not otherwise available to satisfy US intelligence requirement,” including information about trading partners in the area and about governments of island nations, The Intercept reported.

A New Zealand intelligence source confirmed these details, telling the New Zealand Herald that GCSB was monitoring government ministers and senior officials, government agencies, international organizations and non-government organizations in the South Pacific nations.

Once the GCSB makes the data accessible through the XKEYSCORE system, it can be analyzed by spies across the Five Eyes surveillance alliance.

In the 1990s, the GCSB intercepted phone calls and emails from the Asia-Pacific region, but only retained and shared communications collected from specified targets. That policy changed in 2009, when the agency GCSB began collecting “full-take” data and then sharing it via XKEYSCORE, leaked documents show.

Full-take refers to large-scale collection of both content of communications and the metadata – details showing who is contacting whom and when. Instead of targeting a specific set of individuals, full-take surveillance sweeps up all communications indiscriminately.

On Wednesday, the GCSB said in a statement to the Intercept: “The GCSB exists to protect New Zealand and New Zealanders. We have a foreign intelligence mandate. We don’t comment on speculation about matters that may or may not be operational. Everything we do is explicitly authorized and subject to independent oversight.”

— Brent Ritchie (@gbrentritchie) March 4, 2015

In August 2013, New Zealand Prime Minister John Key said he and the GCSB director would resign if the spy agency was found to have conducted mass surveillance – a comment made to reporters at Parliament in the light of assurances that the changes to the GCSB Act 2003 would not mean mass surveillance of New Zealanders.