An appellate court panel will not be abruptly ending the National Security Agency’s bulk collection of millions of Americans’ phone call data, as the American Civil Liberties Union asked them to.

The ruling from the Second Circuit Court of Appeals deferred to Congress, which in June gave the NSA 180 days to shut it down. So the deadline remains November 29.

The appellate panel ruled in May that the domestic collection of information about who is calling who, when, and for how long was not authorized under Section 215 of the USA Patriot Act, as the NSA had argued. It said the program was too broad, that information about every American’s phone call behavior wasn’t “relevant to an authorized investigation.”

But the court gave Congress the chance to weigh in before taking action.

The USA Freedom Act ended the program, but with a grace period.

The ACLU argued in court that the Second Circuit should end the program early, asking for a preliminary injunction. The Court disagreed.

“Regardless of whether the bulk telephone metadata program was illegal prior to May, as we have held, and whether it would be illegal after November 29, as Congress has now explicitly provided, it is clear that Congress intended to authorize it during the transitionary period,” said Thursday’s ruling.

“While we disagree with the appeals court’s decision, its earlier ruling and the passage of the USA Freedom Act mean that bulk collection of Americans’ call records will end in just a few weeks. All Americans should celebrate that fact,” said Alex Abdo, the ACLU attorney who argued the case.