A federal appeals court ruled Friday that a confidential Justice Department legal opinion on the scope of the FBI’s surveillance authority can remain secret.

The U.S. Court of Appeals for the D.C. Circuit rejected an effort by the Electronic Frontier Foundation to make public a January 2010 memo from the Office of Legal Counsel (OLC) that allowed the FBI to informally gather customer phone call records from telecommunications companies.

In a 20-page decision, the court agreed with a lower-court judge that the government has properly withheld the memo under an exception to the Freedom of Information Act.

“The District Court correctly concluded that the unclassified portions of the OLC Opinion could not be released without harming the deliberative processes of the government by chilling the candid and frank communications necessary for effective governmental decision-making,” the court said in its opinion written by D.C. Circuit Judge Harry T. Edwards.

A Justice Department spokesman said the department was “pleased with the decision.”

But Mark Rumold, a lawyer at the EFF, said the civil liberties group was “disappointed by today’s decision, which allows the government to continue to secretly reinterpret federal surveillance laws in ways that diverge significantly from the public’s understanding of these laws.”

The EFF submitted a Freedom of Information Act request for the OLC opinion in February 2011, which the Justice Department rejected. The EFF filed its lawsuit in U.S. District Court in May 2011. And the D.C. Circuit heard oral argument in the case in November.

The case is significant because it is the first time that the D.C. Circuit had taken up the issue of whether such Justice Department legal opinions are required to be disclosed under the Freedom of Information Act.

Government lawyers argued that the OLC issues opinions to guide the attorney general in giving legal advice to the president and that they are not used for making policy. They said that releasing the memo would “chill” the flow of open discussion and hurt the office’s ability to give confidential legal advice to federal agencies.

Rumold argued that the FBI memo was a “blossoming example of secret surveillance law.”

“When the government is allowed to continue to interpret the law in secret, that creates problems for the privacy rights of Americans,” he said.

The FBI has said that it stopped the practice in question in 2006. But the collection of phone data took on new meaning last year, after documents released by former National Security Agency contractor Edward Snowden indicated that the NSA had obtained billions of domestic phone call records.

The EFF was joined in an amicus brief by several other organizations, including The Washington Post.