(By Jonathan Stempel, Reuters) – A U.S. appeals court on Thursday refused to immediately halt the government’s systematic collection of millions of Americans’ phone records during a “transition” period to a new federal scheme that bans the controversial anti-terrorism surveillance.

The 2nd U.S. Circuit Court of Appeals in New York said it would not disturb Congress’ decision, in adopting the USA Freedom Act in June, to provide a 180-day transition period to allow an orderly end to the National Security Agency program.

In May, the appeals court had said the sweeping surveillance first disclosed in 2013 by former NSA contractor Edward Snowden was illegal, and was not authorized by the USA Patriot Act, because it violated Americans’ privacy rights.

The American Civil Liberties Union sought a preliminary injunction to stop the surveillance while the government moves to a less intrusive scheme scheduled to begin on Nov. 29.

But Circuit Judge Gerard Lynch, who wrote the May decision, said Congress intended to let the collection continue during the 180-day period to allow an “orderly transition” to a new, targeted surveillance program.

“An abrupt end to the program would be contrary to the public interest in effective surveillance of terrorist threats, and Congress thus provided a 180-day transition period,” Lynch wrote. “Under the circumstances, we will defer to that reasonable decision.”

The ACLU did not immediately respond to requests for comment. The U.S. Department of Justice, which opposed an injunction, did not immediately respond to a similar request.

The case is American Civil Liberties Union et al v. Clapper et al, 2nd U.S. Circuit Court of Appeals, No. 14-42.

(Reporting by Jonathan Stempel in New York; Editing by Chizu Nomiyama and Marguerita Choy)

