WASHINGTON — A federal judge has for the first time ruled that the National Security Agency's once-secret policy of collecting the dialing records of all phone calls in the country probably violates the Constitution, a defeat for the government that could alter the political debate over the controversial program and set up an eventual review by the Supreme Court.
Monday's ruling will not immediately stop the NSA's massive data collection program because U.S. District Judge Richard J. Leon immediately stayed it to give the government time to appeal. But the decision nonetheless validated several of the arguments made by critics of the NSA and will probably add force to their push to limit the agency.
The decision marked the first public ruling by a judge who had reviewed the agency's activities since the revelations made last summer by former NSA contractor Edward Snowden. Since then, congressional critics of the NSA's activities have pushed for legislation to rein in the agency but have so far been fought to a standstill by its defenders.
The NSA's collection program gathers so-called metadata — such as the numbers that any particular telephone connects with and the length of calls — for virtually every phone call made in the U.S. The NSA keeps the data for five years.
Agency officials emphasize that, unlike with a wiretap, they do not record the contents of any calls. Moreover, they say, they only search a small portion of the database in any year, looking for numbers linked to those used by suspected foreign terrorists.
Even that limited searching, however, can involve millions of phone numbers, Leon noted, adding that what he called a dragnet almost certainly violates the 4th Amendment's ban on unreasonable searches.
"I cannot imagine a more 'indiscriminate' and 'arbitrary invasion' than this systematic and high-tech collection and retention of personal data on virtually every single citizen for purposes of querying and analyzing it without prior judicial approval," wrote the judge, who was appointed to the federal district court by President George W. Bush.
A Justice Department spokesman said the administration was reviewing the ruling. "We've seen the opinion and are studying it," said Andrew Ames. "We believe the program is constitutional as previous judges have found," referring to the judges of the Foreign Intelligence Surveillance Court, who review the NSA's activities in secret.
The administration can appeal the decision to the U.S. Court of Appeals for the District of Columbia Circuit. Just last week, two Obama appointees were confirmed to that court. From there, the losing side could ask the Supreme Court for a review.
If the ruling is upheld, Leon would have to hold further proceedings before making a final ruling for the plaintiffs, who were led by Larry Klayman, a conservative activist who testified he believes the government is "messing with me."
President Obama has previously directed aides to review the NSA's programs and determine whether changes were needed, but the White House has so far opposed most suggestions for large-scale changes in what the NSA and other intelligence agencies do.
Some defenders of the NSA were caught short by the ruling. "To me this is a big surprise," said Sen. Dianne Feinstein (D-Calif.), chairwoman of the Senate Intelligence Committee.
Civil libertarians called the decision long overdue.
"This ruling decimates the NSA's defense of its telephone metadata program," said Faiza Patel, a lawyer for the Brennan Center in New York. "It confirms that who we call and when is our business, not the government's."
Among those applauding the ruling was Snowden.
"I acted on my belief that the NSA's mass surveillance programs would not withstand a constitutional challenge, and that the American public deserved a chance to see these issues determined by open courts," he said in a statement released by Glenn Greenwald, the journalist who worked with him on his first disclosures. "Today, a secret program authorized by a secret court was, when exposed to the light of day, found to violate Americans' rights. It is the first of many."
Senate Judiciary Committee Chairman Patrick J. Leahy (D-Vt.), author of one of the bills to restrict the NSA's activities, welcomed the ruling as well. "Americans deserve an open and transparent debate about the constitutionality, efficacy and appropriateness of the government's dragnet collection program," he said.
After the Sept. 11, 2001, attacks, Congress authorized the government to obtain records that were "relevant to an authorized investigation."
To the surprise of some lawmakers, the Foreign Intelligence Surveillance Court accepted the agency's argument that compiling all phone records would be relevant, even when no individual investigation was underway.
Officials have insisted the NSA's program passes constitutional muster and have cited a 1979 case in which the Supreme Court said police detectives did not need a warrant to use a pen register to record what numbers were dialed on a specific phone.
The justices reasoned that the dialing records did not reveal much that was truly private and that individuals could not claim their rights were violated because they had voluntarily turned the information over to the telephone company.
But Leon said today's computerized gathering of all dialing records represented a threat to privacy that the high court had not anticipated 34 years ago.
"The almost Orwellian technology that enables the government to store and analyze the phone metadata of every telephone user in the United States is unlike anything that could have been conceived in 1979," he wrote. James Madison, the principal author of the Constitution, would be "aghast," he said.
The judge also noted that last year five members of the Supreme Court — including conservative Justice Samuel A. Alito Jr. and liberal Justice Sonia Sotomayor — had raised concerns about how changes in technology were outrunning previous rulings on privacy. In the case, the court limited the government's power to track vehicles with a GPS device. The two justices said that using a computerized tracking device was a much greater threat to privacy than having a police officer follow a car on the street.
Picking up on this theme, Leon said changes in surveillance technology required a change in the law. "Thirty-four years ago, city streets were lined with pay phones. Thirty-four years ago, when people wanted to send 'text messages,' they wrote letters and attached postage stamps," he said.
"People in 2013 have an entirely different relationship with phones than they did 34 years ago," he added. "Records that once would have revealed a few scattered tiles of information about a person now reveal an entire mosaic — a vibrant and constantly updating picture of the person's life."
He also questioned the government's justification for maintaining such a huge database, noting that the NSA's main argument in defense of its program was that having all phone records under its control allowed them to be searched more quickly.
"The government does not cite a single instance in which analysis of the NSA's bulk data collection actually stopped an imminent attack," he said.