​The US Justice Department appealed Friday a federal judge’s December ruling that advanced a legal challenge to the National Security Agency’s bulk collection of Americans’ telephone records.

The Justice Department filed the appeal with the US Circuit Court of Appeals in Washington. US government lawyers are asking for a dismissal of US District Judge Richard Leon’s ruling that called the NSA’s domestic phone metadata collection likely unconstitutional putting it under a threat of shutting down.

“I believe that bulk telephone metadata collection and analysis almost certainly does violate a reasonable expectation of privacy,” Leon wrote in mid-December.

“It’s one thing to say that police expect phone companies to occasionally provide information to law enforcement; it is quite another to suggest that our citizens expect all phone companies to operate what is effectively a joint intelligence-gathering operation with the government.”

After the Justice Department’s appeal of the Leon decision, opposing lawyer and plaintiff Larry Klayman said he will ask the appeals court to refer the case directly to the US Supreme Court, AP reported.

Leon’s December ruling ultimately approved a request for injunction filed by conservative activist Klayman and co-plaintiff Charles Strange, and ordered the government to stop collection through the NSA program of “any telephone metadata associated with their personal Verizon accounts” and the destruction of any of their metadata collected previously.

“I am not convinced at this point in the litigation that the NSA’s database has ever truly served the purpose of rapidly identifying terrorists in time-sensitive investigations, and so I am certainly not convinced that the removal of two individuals from the database will ‘degrade’ the program in any meaningful sense,” he wrote.

Anticipating the government’s appeal, Leon placed a stay on his order that may be lifted pending the outcome of future litigation expected to continue through this year.

Meanwhile, the Foreign Intelligence Surveillance Act court, which oversees government requests for surveillance orders, renewed the telephone metadata collection program again Friday.

The clandestine court has ruled “on 36 separate occasions over the past seven years, that the telephony metadata collection program is lawful,” the Office of the Director of National Intelligence wrote Friday.

Just one day prior to the Justice Department’s appeal in the case challenging NSA surveillance power, another appeal was filed in a concurrent case that has called into question the secrecy and constitutionality of the agency’s data collection methods.

The American Civil Liberties Union filed an appeal Thursday against the NSA’s indiscriminate collection of telephone metadata after the group's suit seeking to halt the policy was dismissed last week.

The ACLU first filed suit against Director of National Intelligence James Clapper in June 2013, following disclosures supplied by former NSA contractor Edward Snowden that revealed the classified NSA program that regularly compels phone companies to provide the government with millions of phone records. The civil liberties advocacy group argued that the program violated Americans’ First and Fourth Amendment rights.

US District Judge William Pauley disagreed, dismissing the case on December 27 and declaring that the NSA program is subject to harsh oversight and is needed to effectively fight terrorism.

“There is no evidence that the government has used any of the bulk telephony metadata it collected for any purpose other than investigating and disrupting terrorist attacks,” he wrote. “While there have been unintentional violation of guidelines, those appear to stem from human error and the incredibly complex computer programs that support this vital tool.”

The ACLU’s appeal again challenges the collection program, which does not monitor individual conversations but tracks numbers dialed, as well as the time and duration of the calls.

Meanwhile, Sen. Bernie Sanders (I-VT) has asked via a letter dated Jan. 3 to outgoing NSA director Keith Alexander whether the surveillance agency “has spied, or is the NSA currently spying, on members of Congress or other American elected officials.”

Sanders defined “spying” as “gathering metadata on calls made from official or personal phones, content from websites visited or emails sent, or collecting any other data from a third party not made available to the general public in the regular course of business,” the Guardian reported.

Elsewhere in the US government’s attempts to keep its sprawling spy operations private, an appeals court ruled Friday that an Office of Legal Counsel opinion concerning the FBI’s electronic surveillance capabilities is exempt from the Freedom of Information Act.

The 2010 opinion written at the FBI’s request by the OLC - which supplies the White House and executive agencies with legal advice - centers around the FBI’s use of “national security letters” to access information. The opinion concluded that US law does not bar electronic communications service providers from voluntarily disclosing phone call records to the FBI without legal process or a qualifying emergency.

The court’s decision justifies the FBI’s rejection of a request made by the Electronic Frontier Foundation to see the opinion made public. The FBI claimed it needed to shield the opinion based on classified information and that it revealed sensitive details of the agency’s operations.