New Zealand’s electronic eavesdropping agency is spying on its neighbors and sharing communications it intercepts in bulk with the National Security Agency through a controversial Internet mass surveillance system, according to newly revealed secret documents.

Government Communications Security Bureau, New Zealand’s equivalent of the NSA, has been sweeping up the data from across the Asia-Pacific region, 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. Each of these small nations and territories maintains friendly relations with New Zealand.

The surveillance, reported Wednesday by the New Zealand Herald in collaboration with The Intercept, is being carried out by GCSB from an intelligence base in New Zealand’s Waihopai Valley (pictured above). Intercepted data collected at the Waihopai site is being shared through an NSA surveillance system called XKEYSCORE, which is used to analyze vast amounts of emails, internet browsing sessions and online chats that are intercepted from some 150 different locations worldwide.

The documents on the spying, obtained by The Intercept from NSA whistleblower Edward Snowden, shine a light on New Zealand’s role in the so-called Five Eyes, a surveillance alliance that includes electronic eavesdropping agencies from New Zealand, the United States, the United Kingdom, Canada and Australia.

GCSB is perhaps the smallest player in the alliance in terms of its funding and number of staff, but the agency is seen as an important player because of New Zealand’s location in the world.

GCSB has been designated a geographic “area of responsibility” to monitor communications in the Southwest Pacific as part of Five Eyes efforts to maintain global surveillance coverage, according to the documents. One NSA memo notes that New Zealand provides “valuable access not otherwise available to satisfy US intelligence requirement.” This includes gathering intelligence about trading partners in the Asia-Pacific region and about governments in neighboring islands, the documents show. 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.

Last year, The Intercept reported that the New Zealand agency was planning a secret project to tap into Internet data flowing across undersea cables. The Waihopai base focuses on gathering data and communications from another source — vacuuming them up as they are being transmitted through the air between satellites. The spying station, designated the codename IRONSAND by the NSA, has previously been linked to a Five Eyes satellite surveillance network known as ECHELON.

In recent years, there has been a dramatic secret shift in the surveillance policy at the Waihopai base.

Former GCSB officials told the New Zealand Herald that, during the 1990s, Waihopai intercepted a large number of phone calls and emails from the Asia-Pacific region, but only retained and gave its allies communications collected from certain specified targets. This has now changed. In 2009, Snowden documents show, GCSB upgraded its capabilities in order to collect “full-take” data at the base and then share it directly onto XKEYSCORE. Full-take is a term used by surveillance agencies to refer to large-scale collection of both content of communications and the metadata — details showing who is contacting whom and when. Instead of targeted collection against a specific set of individuals, full-take surveillance sweeps up all communications indiscriminately.

Once the New Zealand agency makes the data accessible through the XKEYSCORE system, it can then be analyzed by spies across the Five Eyes. One secret British memo, dated from 2011, noted: “GCSB have given us access to their XKS [XKEYSCORE] deployments at IRONSAND, a GCSB comsat [communications satellite] site which is rich in data for the South Pacific region.” The memo added: “Specifically, we can access both strong selected data and full-take feed from this site.”

Following the earlier disclosures about GCSB’s surveillance last year, Snowden wrote in an op-ed for The Intercept that New Zealand citizens’ communications intercepted by the Waihopai base were among those being shared with the Five Eyes agencies. “At the NSA I routinely came across the communications of New Zealanders in my work with a mass surveillance tool we share with GCSB, called ‘XKEYSCORE,’” Snowden wrote. New Zealand’s prime minister John Key later conceded that Snowden’s allegation “may well be right,” but he refused to comment on whether the country’s spies used XKEYSCORE.

On Wednesday, GCSB declined to comment about the latest revelations. A spokesman for the agency said in a statement to The Intercept and the New Zealand Herald: “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.”

The NSA had not responded to a request for comment at time of publication.

In the coming days, more revelations about surveillance in New Zealand from the Snowden documents will be reported as part of collaboration between The Intercept, the New Zealand Herald, the Herald on Sunday and the Sunday-Star Times.

Photo: A satellite surveillance dome at GCSB’s Waihopai Valley site; Tim Cuff/New Zealand Herald/AP