A federal appeals court has ruled a National Security Agency program that collected millions of Americans' phone records is illegal.
The decision from the Second Circuit Court of Appeals on Wednesday said the phone records collection program is not authorized under the Patriot Act.
The program "exceeds the scope" of what Congress intended when it was first passed into law in 2001, just weeks after the September 11 attacks in New York.
"The text of [section 215] cannot bear the weight the government asks us to assign to it, and that it does not authorize the telephone metadata program," wrote judge Gerard E. Lynch.
But the court upheld the denial of an injunction aimed at blocking such collection.
The appeals court adds to a lower court's decision from December 2013, which said the program was likely unconstitutional, adding that the court nonetheless "erred" in allowing the program to continue.
Leaked by Edward Snowden, the program collected records from cell and phone carriers, including Verizon, under Section 215 of the Patriot Act. The law allows the government to collect business records, or "any tangible things." The wording of the statute has been under heavy scrutiny for years.
Rep. Jim Sensenbrenner (R-WI, 5th), author of the Patriot Act, who renounced the use of his law in the wake of the Snowden disclosures, said he "never intended Section 215 to allow bulk collection."
"This program is illegal and based on a blatant misinterpretation of the law," he added. "It's time for Congress to pass the USA Freedom Act in order to protect both civil liberties and national security with legally authorized surveillance."
The White House told Reuters following the ruling that it is in the process of evaluating the court decision, but did not comment on specifics.
The case was brought by the American Civil Liberties Union (ACLU) just days after the program was leaked in June 2013. The ACLU did not immediately comment at the time of writing.
Section 215 of the Patriot Act is due to expire on June 1. Congress is currently working on a number of bills that would replace and end certain surveillance programs.