The National Security Agency is tracking the location and movements of hundreds of millions of cellphones outside the United States in an effort to find suspicious travel patterns or coordinated activities by intelligence targets, according to secret documents leaked by the former N.S.A. contractor Edward J. Snowden.

To carry out the tracking, the agency collects nearly five billion records on cellphones outside the United States each day from taps on fiber optic cables and other communication conduits that carry cellphone traffic, the documents say. Enough of that data is saved to track a small fraction of the phones over time.

The documents and the tracking program were described by The Washington Post on Wednesday.

Cellphone calls, text messages and other traffic must be routed through global networks from the caller or sender to the intended recipient — another cellphone, for example. That routing is guided by so-called metadata, which acts as a sort of addressing system for the network. The metadata inevitably contains information about where a call originated, and therefore the location of a cellphone.

In October, The New York Times reported that the agency carried out a secret test project in 2010 and 2011 to collect large amounts of data on the location of Americans’ cellphones inside the United States. James R. Clapper Jr., the director of national intelligence, confirmed the existence of the test program but said that it was never put into practice.