Telecom giant AT&T Inc has played a bigger than previously thought role in helping the National Security Agency (NSA) spy on swathes of internet traffic, which included wiretapping all UN headquarters’ communications, The New York Times has revealed.

Secret surveillance bill? Senate could pass CISA info-sharing bill with barely any debate http://t.co/vRBXoiXko7pic.twitter.com/hliMyzcg4F — RT America (@RT_America) July 31, 2015

The report is based on leaked documents, which date from 2003 to 2013 and were provided by whistleblower and former NSA contractor Edward Snowden. The files describe the NSA’s relationship with the telecommunications company as “highly collaborative,” citing AT&T’s “extreme willingness to help.”

A decades-long partnership has helped the NSA to accomplish a whole range of classified activities, including providing technical assistance to carry out a secret court order that enabled wiretapping of all internet communications at the headquarters of the United Nations, which is an AT&T customer.

AT&T has given the NSA access to billions of emails that flowed across its domestic networks, documents show http://t.co/k6Qx0AllWO — The New York Times (@nytimes) August 15, 2015

AT&T also gave the spy agency access to billions of emails that landed in the domestic networks.

The documents explain that the telecom giant was able to deliver under various legal loopholes international and foreign-to-foreign internet communications even if they passed through networks located in the US.

To show the extent of AT&T’s involvement, the files revealed that the company installed surveillance equipment in at least 17 of its major US internet hubs, thought to be a lot more than Verizon installed. AT&T’s engineers were also the first ones to get their hands on this new surveillance technologies created by the NSA, the newspaper reported.

Further proving a unique relationship is the NSA’s top-secret budget from 2013, which doubled the funding of any other cooperation of similar size, according to the documents.

“This is a partnership, not a contractual relationship,” one document said, warning NSA officials to be polite and professional. “[AT&T’s] corporate relationships provide unique accesses to other telecoms and ISPs [Internet service providers],” said another.

In 2011 AT&T began to supply NSA with over 1.1 billion domestic cellphone calling records per day in 2011, which was “a push to get this flow operational prior to the 10th anniversary of 9/11,” the Times reported.

The company also gave access to foreign-to-foreign internet traffic, which was especially valuable to NSA. This was possible because a massive amount of the world’s network communications pass through US cables.

AT&T spokesman Brad Burns told Reuters that the company does not “voluntarily provide information to any investigating authorities other than if a person’s life is in danger and time is of the essence. For example, in a kidnapping situation we could provide help tracking down called numbers to assist law enforcement.”

In June 2013, Snowden, a former NSA contractor, blew the whistle on the agency’s mass surveillance of Americans, handing over an archive of documents to journalist Glenn Greenwald and selected media organizations around the world. After the US government revoked his passport, he was stranded in a Moscow airport, reportedly on his way to Latin America. Snowden then applied for temporary asylum in Russia, where he has been living and working since.

Snowden: NSA spies on Cameron; could have ‘backdoor’ into GCHQ http://t.co/k9bOYTFMv4pic.twitter.com/8xjEIetYsb — RT (@RT_com) June 3, 2015

The US government continues to pursue Snowden, insisting that he stole classified information, and betrayed the nation, claiming that his “dangerous” decision had “severe consequences” for the security of the United States.

Others, however, have hailed Snowden as a “hero” who has disclosed unconstitutional activities by the US government.

READ MORE: 33% of Americans want Snowden pardoned – poll

The latest telephone survey by Morning Consult, which asked 2,000 Americans, showed 33 percent of respondents speaking out in support of a pardon for Snowden, 43 percent speaking out against such a move, and 24 percent abstaining. Meanwhile, 53 percent of those asked said they would support the government’s position on prosecuting the whistleblower.