WASHINGTON — A federal appeals court on Friday ruled that the Obama administration may continue to withhold a Justice Department memo that apparently opened a loophole in laws protecting the privacy of consumer data.

The memo establishes the legal basis for telephone companies to hand over customers’ calling records to the government without a subpoena or court order, even when there is no emergency, according to a 2010 report by the Justice Department’s inspector general. The details of the legal theory, and the circumstances in which it could be invoked, remain unclear.

The ruling, by the United States Court of Appeals for the District of Columbia Circuit, came down on the side of a broad conception of the executive branch’s power to keep secret its interpretation of what the law permits it to do. The ruling may make it easier for the government to shield other memos by the Justice Department’s powerful Office of Legal Counsel from disclosure under the Freedom of Information Act.

The document at issue is a classified memo issued by the Office of Legal Counsel on Jan. 8, 2010. A report later that year by the Justice Department’s inspector general at the time, Glenn A. Fine, disclosed the memo’s existence and its broad conclusion that telephone companies may voluntarily provide records to the government “without legal process or a qualifying emergency,” notwithstanding the Electronic Communications Privacy Act.