The federal government's telephone metadata collection program revealed by NSA leaker Edward Snowden is illegal, a federal appeals court ruled on Thursday, CNN reported.

The Patriot Act does not authorize the National Security Agency to gather up millions of phone records on an ongoing basis, Judge Gerard Lynch ruled. Writing for a three judge panel of the Second Circuit Court of Appeals, the judge noted that the 2011 law "cannot bear the weight the government asks us to assign to it."

"It does not authorize the telephone metadata program," Lynch concluded. While seemingly benign, metadata can reveal "civil, political or religious affiliations," as well as personal behavior and "intimate relationships," he added.

The decision comes as Congress is considering whether to renew the Patriot Act, which was first passed in the immediate aftermath of the Sept. 11 terrorist attacks on New York and Washington and has since been extended several times, Wired noted.

Privacy advocates have long attacked the metadata surveillance program the law supposedly authorized and, in the wake of Snowden's revelations, even the White House said it was looking into alternatives to the current system of collecting Americans' phone records.

Thursday's decision "provides the most significant legal blow to the NSA operations to date," the Hill judged. It comes more than a year after a lower court had questioned the program's constitutionality and called it "almost Orwellian."

Meanwhile, two other appellate courts are also in the process of considering challenges to the NSA's phone records program, and the Supreme Court may ultimately have to settle the issue.

Stephen Vladeck, a professor at American University's Washington College of Law, told CNN it would be hard to overestimate the significance of the Second Circuit Court's decision.

"This is a landmark ruling and a critically important decision, " Vladeck said. "What it means going forward depends entirely on Congress, because this provision was set to expire June 1 anyway," the professor added referencing the section of the Patriot Act the government had claimed authorized the bulk collection.