06.07.13 8:45 AM ET

At least one foreign government has gained access to sensitive data collected by the National Security Agency from U.S. telecommunications companies in dragnet court warrants demanding the secret transfer of U.S. customers’ calling records.

The information collected by the NSA, known as “metadata,” does not include the content of the phone calls or the names of the people associated with the accounts. But it does tell the government when calls were made, what numbers were dialed, and the location and duration of those calls. Current and former U.S. intelligence officials familiar with the longstanding program to collect metadata from American telecommunications and Internet companies tell The Daily Beast that, in a few discreet cases, the NSA has shared unedited analysis of these records with its British counterpart, the Government Communications Headquarters (GCHQ).

The Guardian on Friday reported that documents the newspaper obtained showed the GCHQ in 2010 gained access to an NSA metadata collection program known as Prism to secretly tap into the servers of leading internet companies such as Apple and Google. The documents showed the British generated 197 intelligence reports from access to the system in 2012, the Guardian reported.

Late Thursday, James Clapper, the director of national intelligence, issued a statement defending the government's collection of phone records, which he said protected the privacy of most Americans. For example, Clapper said only specially trained personnel could access the vast database of metadata collected by the government. A secret body known as the Foreign Intelligence Surveillance Court reviews the program every 90 days and only allows the government to query the database "when there is a reasonable suspicion, based on specific facts, that the particular basis for the query is associated with a foreign terrorist organization."

With advances in computer science, intelligence services can now mine vast amounts of data collected by telecom companies, Internet service providers, and social-media sites for patterns that can illuminate terrorist networks and help solve crimes. Rep. Mike Rogers, the Republican chairman of the House Permanent Select Committee on Intelligence, told reporters that he knew of one instance where the NSA metadata program thwarted a domestic terrorist attack.

These metadata, these intelligence officers say, reside in vast hard drives that belong to the NSA. Analysts there can then take a phone number or email address and uncover suspected terrorists’ associates, find their locations, and even learn clues about their possible targets.

Peter Wood, the CEO of First Base Technologies, a security firm that works closely with British law enforcement in this area, says this kind of “big data” analysis can be useful to federal law enforcement.

“All emails have headers, which are full of information most people don’t see,” Wood says. “It allows law enforcement to trace the root and source of emails—that gives them the provenance of an email. This allows them to determine the physical origin of threats, if they can be sure the source of the email has not, in turn, been compromised itself.” Wood compared the analysis to how commercial Internet companies use similar data to target ads to individuals based on their search patterns.

Sometimes, the analysis of metadata is shared between allied services, current and retired U.S. intelligence officers say. This is particularly true with the GCHQ, Britain’s equivalent of the NSA.

One former senior U.S. intelligence official with knowledge of the program tells The Daily Beast, “My understanding is if the British had a phone number, we might run the number through the database for them and provide them with the results.”

“I do not know of cases where the U.S. government has shared this kind of metadata with the United Kingdom, but I would be surprised if this never happened,” Wood says. “Both countries cooperate very closely on counterterrorism.”

The U.S. and the U.K. have an agreement to share signal intercepts and electronic intelligence through a pact known as the United Kingdom United States of America Agreement. Over the years, the agreement has been expanded to include Australia, Canada, and New Zealand.

U.S. intelligence officials who spoke to The Daily Beast said that British nationals were not permitted to sit at the actual terminals where NSA analysts mine the metadata collected from phone companies and Internet service providers. But British GCHQ has received unredacted analysis of targeted searches, according to these sources.

A spokeswoman for the NSA declined to comment for this article.

“The whole idea of sharing information that could be of value in a terrorism investigation would be a high priority, especially after 9/11,” says James Bamford, the author of three histories of the NSA, including his most recent book, The Shadow Factory. “If the United States feels it got the information legally, which it does in this case, then from all I know the NSA believes it has the authority to pass the intelligence on to intelligence partners.”

Jameel Jaffer, deputy legal director at the American Civil Liberties Union, says he is worried about what becomes of the records collected by the NSA. “The big open question is what happens to this data when it’s collected,” Jaffer says. “Is it shared amongst agencies? Is it used in law-enforcement investigations? Has it been used in prosecutions? And has it been shared with foreign countries—and which foreign countries has it been shared with and under what conditions?”