A federal judge has ruled against the NSA’s controversial collection of Americans’ phone records. The program was set to expire by the end of the month, but the ruling is considered a victory for civil liberties because it sets a legal precedent.

In his ruling on Monday, Judge Richard Leon of the US District Court reiterated his assertion that the NSA’s program “likely violates the Constitution” and said that “the loss of constitutional freedoms for even one day is a significant harm.”

In doing so, he sided with conservative legal activist Larry Klayman, whose clients had sued the NSA over its data collection following the revelations of whistleblower of Edward Snowden in 2013.



“This court simply cannot, and will not, allow the government to trump the Constitution merely because it suits the exigencies of the moment,’’ Leon wrote in his 43-page decision.

Klayman said that winning the case is a “tremendous victory for the American people.” He added that Leon is one of the few judges in the country who “has the guts to stand in the breach for the American people during a period of time where their government is running roughshod over them."

Klayman also said that he will continue the fight and seek monetary damages from the government.

READ MORE: Federal judge says NSA's phone surveillance program is likely unconstitutional

It's not clear whether the Department of Justice, which had argued the case, will quickly appeal the new ruling.

"The government is reviewing the decision," spokeswoman Nicole Navas told US News and World Report in an email.

Monday’s ruling comes almost two years after Judge Leon made a similar decision, calling the mass record collection program “almost Orwellian,” and only 20 days before the program is expected to end due to the Congress passing the USA Freedom Act in June.

The USA Freedom Act will shift the responsibility of collecting data from the NSA itself to private telecom companies. Intelligence agencies like the NSA would then ask the companies for specific data on an individual allegedly connected to a terrorist organization or a foreign nation.

READ MORE: USA Freedom Act vs expired Patriot Act provisions: How do the spy laws differ?

The small window between the ruling and the implementation of the new law means that the immediate effects of Klayman’s victory will be trivial. But the precedent set by the decision could carry a lot of weight in future court battles, according to David Greene, civil liberties director for the Electronic Frontier Foundation.

“In effect, it only requires them to stop doing very little of what they do,” Greene told Wired. “But the opinion is very broad-reaching. And because the NSA makes many of the same arguments to justify all of its mass spying programs, it’s really significant when a judge rejects them.”

Other courts have had mixed opinions about the NSA’s surveillance program. In August, the US Court of Appeals for the 2nd Circuit in New York overturned Leon’s original decision on the case, known as Klayman v. Obama, from May this year. A three-judge panel ruled that Klayman had not met the legal threshold to file the suit. When Klayman added new plaintiffs and new information, the case was sent back to Judge Leon.

However, in October the court decided in the opposite direction on the record collection issue, ruling that the phone records collection could continue until the program met its Congressionally-determined demise at the end of November. The judges said that it was not necessary to block the program, because it was already set to expire soon.