A U.S. spying program that collects data about millions of Americans’ phone calls is illegal, a federal appeals court ruled on Thursday, adding pressure on lawmakers to decide quickly whether to end or replace the program, which was intended to help fight terrorism.
While stopping short of declaring the program unconstitutional, the 2nd U.S. Circuit Court of Appeals in Manhattan said Congress did not authorize the National Security Agency to collect Americans’ phone records in bulk.
The existence of the NSA’s collection of “bulk telephony metadata” was first disclosed in 2013 by former NSA contractor Edward Snowden.
Writing for a three-judge panel, Circuit Judge Gerard Lynch said Section 215 of the Patriot Act governing the collection of records to fight terrorism did not authorize what he called the NSA’s collection of a “staggering” amount of information, contrary to claims by the Bush and Obama administrations.
“Such expansive development of government repositories of formerly private records would be an unprecedented contraction of the privacy expectations of all Americans,” Lynch wrote in a 97-page decision. “We would expect such a momentous decision to be preceded by substantial debate, and expressed in unmistakable language. There is no evidence of such a debate.”
The appeals court did not issue an order to stop the collection of data, noting that parts of the Patriot Act including Section 215 will expire on June 1. Lynch said it is for Congress to make clear whether it considers the NSA program permissible.
Federal appeals courts in Washington, D.C. and California are also considering whether the program is legal.
The U.S. Department of Justice had called the program necessary to protect national security.
This article originally appeared on Recode.net.