By the end of 2013, a great number of documents revealed the once-secret history of the National Security Agency’s telephone-metadata program, which, since 2001, has collected the phone records of virtually all Americans. Some were classified files that Edward Snowden, a former N.S.A. contractor, gave to reporters; some have been in the public record for years; some were recently declassified by the government; and others are judicial opinions released by judges now sorting through the constitutional issues raised by the revelations about the program. As we begin the New Year, here’s a short history of metadata collection and the Obama Administration’s response to it, as told by an assortment of the most important documents.

1. December, 1999: Internal warnings about “electronic surveillance.”

In 1999, according to an N.S.A. Inspector General report leaked by Edward Snowden, lawyers at the Clinton Justice Department ruled that searching telephone metadata amounted to unauthorized surveillance of Americans:> NSA proposed that it would perform contact chaining on metadata it had collected. Analysts would chain through masked U.S. telephone numbers to discover foreign connections to those numbers, without specifying, even for analysts, the U.S. number involved. In December 1999, the Department of Justice (DoJ), Office of intelligence Policy Review (OIPR) told NSA that the proposal fell within one of the FISA definitions of electronic surveillance and, therefore, was not permissible when applied to metadata associated with presumed U.S. persons (i.e., U.S. telephone numbers not approved for targeting by the FISC).

2. November, 2001: The phone records of most Americans begin flowing to the N.S.A.

After 9/11, President Bush authorizes the N.S.A. to collect phone and Internet content and metadata without a warrant. Within weeks, under the so-called President’s Surveillance Program (P.S.P.), the major telephone companies voluntarily hand over the data. The N.S.A. creates a twenty-four-hour “Metadata Analysis Center” (MAC) to search the phone records.

3. October 26, 2001: The Patriot Act is passed.

Section 215 allows the government to seize “any tangible things (including books, records, papers, documents, and other items) for an investigation to protect against international terrorism or clandestine intelligence activities.”

4. December 14, 2005: Debate over the reauthorization of the Patriot Act.

Senators Barack Obama, Chuck Hagel, John Kerry, Richard Durbin, and several colleagues sign a letter warning that Section 215 “would allow the government to obtain library, medical and gun records and other sensitive personal information” that “would allow government fishing expeditions targeting innocent Americans.” They demand that the records requested should “have some connection to a suspected terrorist or spy,” a requirement that would

protect innocent Americans from unnecessary surveillance and ensure that government scrutiny is based on individualized suspicion, a fundamental principle of our legal system.

In March, 2006, the Patriot Act is reauthorized without the changes sought by Obama and others.

5. May 23, 2006: The Bush Administration attempts to make the phone-metadata program legal retroactively.

The Bush Administration goes before the secret Foreign Intelligence Surveillance Act court and cites the Patriot Act to seek legal authorization for the N.S.A.’s phone-metadata program—the one that has already been running for five years, since 2001. Attorney General Alberto Gonzales argues that the N.S.A. needs the call records of all Americans, even though most of the records have no connection to terrorism:

Although admittedly a substantial portion of the telephony metadata that is collected would not relate to operatives of [REDACTED], the intelligence tool that the Government hopes to use to find [REDACTED] communications—metadata analysis—requires collecting and storing large volumes of the metadata to enable later analysis. All of the metadata collected is thus relevant, because the success of this investigative tool depends on bulk collection.

6. May 24, 2006: The FISA court grants Gonzales’s request.

The FISA court orders the major phone companies to deliver “all call-detail records or ‘telephony metadata,’ ” defined as

comprehensive communications routing information, including but not limited to session identifying information (e.g., originating and terminating telephone number, communications device identifier, etc), trunk identifier, and time and duration of call.

7. March 2, 2009: The FISA Judge Reggie Walton says that the N.S.A. has misled him.

Walton writes that the N.S.A.’s regime for safeguarding the privacy of Americans whose data is collected in the metadata program “has never functioned effectively.”

8. September 14, 2009: Obama fully embraces the use of the Patriot Act to seize phone records in bulk.

Despite massive compliance problems that continue to be uncovered throughout 2009, the Obama Justice Department fights to keep the metadata program running. In September, Obama requests that the Patriot Act be reauthorized without the changes he sought when he was a senator. The Justice Department sends Congress a letter insisting that

the business records provision addresses a gap in intelligence collection authorities and has proven valuable in a number of contexts … [including] important and highly sensitive intelligence collection operations.

Section 215, the letter says, “is being used as intended.”

9. June 21, 2013: Director of National Intelligence James R. Clapper apologizes for untruthful testimony.

A month after the metadata is revealed to the public in stories, based on Snowden’s leaks, in the Guardian and Washington Post, Clapper writes to the Senate Intelligence Committee to apologize for his testimony on March 12th. In response to a question by Senator Ron Wyden about whether the N.S.A. collects “data at all on millions or hundreds of millions of Americans,” Clapper had answered, “No.”