The Justice Department on Friday appealed the ruling of a federal judge who said the National Security Agency’s massive collection of domestic telephone data was almost certainly unconstitutional.

The Justice Department’s filing to the U.S. Court of Appeals for the D.C. Circuit follows a Dec. 16 ruling by U.S. District Judge Richard J. Leon that granted a request for an injunction and blocked the collection of the phone data for conservative legal activist Larry Klayman and a co-plaintiff.

Leon, who was nominated by President George W. Bush and appointed to the bench in 2002, stayed his decision to allow the Justice Department time to appeal. But in a strongly worded opinion, he rejected the government’s arguments that the program is legal.

The “almost-Orwellian technology” that allows the government to collect, store and analyze phone metadata is “unlike anything that could have been conceived in 1979” and is “at best, the stuff of science fiction,” Leon wrote.

In 1979, the Supreme Court ruled that Americans have no reasonable expectation of privacy in records of their calls that are held by phone companies, and the court said that a warrant to collect them is not required.

In a separate case, less than two weeks after Leon's ruling, a federal judge in New York found just the opposite. U.S. District Judge William H. Pauley III ruled that the domestic collection program was legal and rejected a challenge brought by the American Civil Liberties Union, which filed an appeal Thursday.

If the constitutionality of the NSA program divides the federal appeals courts, it is likely the Supreme Court will decide the issue.

Along with its appeal, the Obama administration on Friday revealed that the secret Foreign Intelligence Surveillance Court renewed an order allowing the NSA’s domestic phone record collection.

In a statement, the Office of the Director of National Intelligence (ODNI) said that Leon’s ruling was the “lone contrary decision” and cited several rulings that sided with the administration, including the Dec. 27 ruling by Pauley.

“It is the administration’s view, consistent with the recent holdings of the United States District Courts for the Southern District of New York and Southern District of California, as well as the findings of 15 judges of the Foreign Intelligence Surveillance Court on 36 separate occasions over the past seven years, that the telephony metadata collection program is lawful,” the ODNI statement said.