In a historic decision, a federal judge in Washington, D.C. today declared that the NSA’s mass phone records surveillance is likely unconstitutional, ruling that the plaintiff’s data should be purged from the system and prohibiting the NSA from collecting further phone records from the plaintiffs.

The case, Klayman v. Obama, undermines the government’s assertions that its bulk surveillance program, which collects virtually every phone record in the United States, is legal. Judge Richard Leon found the “[b]ulk telephony metadata collection and analysis almost certainly does violate a reasonable expectation of privacy,” which, in turn, likely results in a violation of the Fourth Amendment.

Judge Leon stayed the order pending appeal because of the significant nature of the decision. Both EFF and the ACLU have active lawsuits challenging the same program, before other judges.

But make no mistake: the judge’s language in condemning the program was unequivocal. “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 it and analyzing it without judicial approval,” he wrote. He continued: “the author of the Constitution, James Madison…would be aghast” at the NSA’s surveillance program.

Judge Leon also rejected the idea courts other than the secret, one-sided FISA court could rule on the program’s constitutionality: “While Congress has great latitude to create statutory scheme like FISA, it may not hang a cloak of secrecy over the Constitution.”

Critically, the judge directly addressed the Supreme Court case Smith v. Maryland— the ruling from the 1970s that allowed law enforcement to obtain the records of a single targeted individual without a warrant, for a few days. This decision is the pillar upon which the government has justified its expansive surveillance, having secretly re-interpreted that decision to allow them to get every phone record of every individual in the country, regardless of whether they were under investigation.

Judge Leon wrote: “The question before me is not the same question that the Supreme Court confronted in Smith” and is “a far cry from the issue in this case.” He correctly differentiated between surveillance of the limited information on one person and the ability of today’s law enforcement to take in mass amounts of information over long periods of time and map out a person’s life through every single connection made through a telephone:

This short-term, forward looking (as opposed to historical), and highly-limited data collection is what the Supreme Court was assessing in Smith. The NSA telephony metadata grogram, on the other hand, involves the creation and maintenance of a historical database containing five years’ worth of data. And I might add, there is the very real prospect that the program will go on for as long as American is combating terrorism, which realistically could be forever.

Judge Leon emphasized that “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 continued:

Admittedly, what metadata is has not changed over time. As in Smith, the types of information at issue in this case are relatively limited: phone numbers dialed, date, time, and the like. But the ubiquity of phones has dramatically altered the quantity of the information that is now available, and more importantly, what that information can tell the Government about people’s lives.

“Put simply,” Judge Leon concluded, “people in 2013 have an entirely different relationship with phones than they did thirty-four years ago.” This analysis crystalizes the problems with the government’s over reliance on Smith, recognizes the limits on that holding in relation to all sorts of digital surveillance we see today as a result of the expansion of technology.

But in perhaps his most important point when he discussing privacy in the digital age, Leon explained that because of an increased awareness of the ability of law enforcement to track our movements via technology, we have a more reasonable expectation of privacy, not less:

Whereas some may assume that these cultural changes will force people to ‘reconcile themselves’ to an ‘inevitable’ ‘diminution of privacy that new technology entails,’ I think it is more likely that these trends have resulted in a greater expectation of privacy and a recognition that society views that expectation as reasonable.

While we still have a long way to go before the NSA mass phone records program is permanently declared unconstitutional once and for all, this is a truly historic ruling and an important first step in ensuring American’s privacy is protected in the digital age.