NEW YORK (CBSNewYork/AP) — A federal appeals court in New York has ruled that the bulk collection of Americans’ phone records by the government exceeds what Congress has allowed.

The 2nd U.S. Circuit Court of Appeals in Manhattan issued its decision Thursday.

In it, a three-judge panel said the case brought by the American Civil Liberties Union illustrated the complexity of balancing privacy interests with the nation’s security.

A lower court judge had thrown out the case. The appeals court said the lower court had erred in ruling that the phone records collection program was legal.

However, the 2nd Circuit declined to block the program, saying it is now up to Congress to decide whether and under what conditions it should continue.

It said a debate in Congress could profoundly alter the legal landscape.

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)