A federal judge has ordered an immediate halt to the NSA's controversial phone records collection program, ruling that the program violates the Constitution.

US District Judge Richard Leon's decision to end the collection is a victory for the plaintiffs in the case and for civil liberties groups who have been asserting that the program was unconstitutional since it was first exposed by Edward Snowden in 2013. But while the ruling is important in principle for what it says about the legality of the program, its practical importance is minimal since the ruling only applies to the two plaintiffs who brought suit against the NSA—Larry Klayman, a conservative legal activist, and his business.

Even that victory is minor since the NSA's collection program is already set to end on November 29. The ruling is significant anyway, however, because it's so rare that a judge ever enjoins the NSA from spying. This decision could set a precedent for other cases, according to David Greene with the Electronic Frontier Foundation.

"In effect, it only requires them to stop doing very little of what they do," says Greene, senior staff attorney and civil liberties director for the Electronic Frontier Foundation. 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."

Last May, different judges with the Second Circuit Court ruled that the program is illegal. Following that ruling, lawmakers passed a bill to halt the collection program, but they gave the NSA a 180-day grace period to replace it with a new system. Under that new system, phone companies will retain customer call records instead. The government will still be able to access the records by obtaining a court order from the Foreign Intelligence Surveillance Act any time it wishes to view them, but this would limit access only to records that are relevant to a national security investigation.

The NSA's phone records collection program began around May 2006 and has continued until today, allowing the spy agency to collect millions of phone records for customers of Verizon and other US phone companies. It's not known exactly how many records the spy agency has collected in the nine years it has been operating, but the records include numbers dialed and received, as well as the date, time, and duration of the calls.

This is not the first time that Judge Leon ruled that the collections program is unconstitutional in the Klayman case. He ruled the same thing previously in 2013, when he issued an injunction to halt the collection program. But he also issued a stay on the injunction, pending an appellate review. It took until November 2014 for arguments to proceed in the appellate court, and it took that court until August of this year to issue its opinion—an opinion that came after lawmakers had already passed the bill to halt the program.

In his new ruling released this week, Leon asserted that the government's Constitutional violation was so egregious that it could not be allowed to stand another day.

“Although this court appreciates the zealousness with which the government seeks to protect the citizens of our nation, that same government bears just as great a responsibility to protect the individual liberties of those very citizens," Leon wrote.

Federal judges have so far been divided on the constitutionality of the phone records collection program. Three judges have ruled it constitutional, while Leon stands alone at ruling it unconstitutional. Although the other ruling by the Second Circuit Court last May found that the program was illegal, the circuit judges did not rule on its constitutionality. Instead their ruling was based on whether the Patriot Act contained language that authorized the government to conduct the mass spying operation. They found that it did not.