The U.S. National Security Agency uses domestic surveillance data to map the social networks of certain Americans, the New York Times reported.

According to documents leaked to the Times by former intelligence contractor Edward Snowden, the agency used phone and email logs gathered on U.S. citizens to assemble social networks of targeted Americans.

Throughout the summer, documents leaked by Snowden have revealed the agency’s comprehensive spying practices, from tapping into fiber optic Internet cables to breaking encryption schemes and leveraging warrants obtain in a secret foreign intelligence court for Americans’ private user data from Facebook, Google, and other Silicon Valley giants.

Until now, it was largely unclear how the NSA assembled and used the massive amount of Internet and telephone surveillance data it collected. According to the Times, the most recent documents from Snowden indicated that the agency incorporates data collected on bank transactions, Facebook pages, passenger manifests, GPS logs, and tax information into its network maps.

Until November of 2010, agents only built such maps on foreign persons. But a memo from January of 2011 explained that the agency expanded the operation to allow “large-scale graph analysis on very large sets of communications metadata without having to check foreignness” of intercepted email addresses and phone numbers.

An NSA spokesperson told the Times that this decision to allow agents to assemble networks of Americans based on their phone and email logs stemmed from a 1979 Supreme Court decision that Americans have no right to privacy regarding the phone numbers they’ve called. The Justice Department interpreted this ruling as a legal justification for the agency to construct social network maps with phone records.

“All of NSA’s work has a foreign intelligence purpose,” an agency spokesperson told the Times. “Our activities are centered on counterterrorism, counterproliferation and cybersecurity.”

The spokesperson did not comment to the paper on how many Americans’ social networks had been graphed by the agency.

NSA slide via New York Times | Illustration by Fernando Alfonso III