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.

READ MORE: Driver Charged With DWI, Manslaughter In Crash That Killed Mother, Daughter On Rockaway Boulevard In Queens

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.

READ MORE: Citizen App Seeks 'Field Team Members' To Live Stream Breaking News Stories

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.

MORE NEWS: NYC DOT Asks New Yorkers To Weigh In On Future Citi Bike Station Locations In Brooklyn, Queens

(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.)