An appeals court ruled on Friday that more than 6,000 pages of the so-called Senate torture report cannot be made public because they consist of congressional records that are not subject to disclosure under the Freedom of Information Act, which only covers federal agencies.

The unanimous ruling by the U.S. Court of Appeals for the D.C. Circuit in Washington made clear that records that Congress shares with federal agencies can't be disclosed if there's a "clear intent" by lawmakers "to control the document."

The decision dealt a major blow to the American Civil Liberties Union, which sued the CIA and other federal agencies that saw the full report ahead of the Senate's release of a much shorter executive summary in 2014.

The ACLU had argued that the Senate Select Committee on Intelligence, then headed by Sen. Dianne Feinstein (D-Calif.), had "relinquished control" of the full report when it allowed President Barack Obama and other agencies to inspect it before the much briefer executive summary was released to the public.

But the appeals court rejected that argument, relying on a "critical" June 2009 letter Feinstein sent to the CIA that made "plain" that the Senate committee "intended to control any and all of its work product" -- including the 6,963-page report that resulted from its investigation into widespread detainee abuse by the agency during the Bush administration.

The court said that the "mere transmission" of the full report to the executive branch didn't mean the document was now discoverable under federal public-disclosure laws.

"The Committee effectively stamped its control over the Full Report when it wrote the terms of the Letter," wrote U.S. Senior Circuit Judge Harry Edwards Friday, concluding that those terms governed the report's lengthy process of revisions and approval by the two government branches in the years that followed.

Hina Shamsi, the ACLU lawyer who in March argued in favor of the disclosures, expressed disappointment about Friday's ruling on Twitter and said her organization is weighing whether to appeal the ruling to the Supreme Court.

Feinstein, through spokesman Tom Mentzer, sidestepped a question from The Huffington Post about whether she believes the full report remains in the Senate's control and thus outside the public's reach.

Instead, the senator suggested that only certain officials should be granted access to its contents.

"Now that this case is resolved, I again call on the administration to allow appropriate, cleared individuals to have full access to the study and for the National Archives to fulfill its obligation to preserve this document,” Feinstein said in a statement.

But in a December 2014 letter to the president — after the torture report’s executive summary was made public — Feinstein seemed to defer to the executive on what do to with the full report, counseling that it should allow “for use as broadly as appropriate” so that the abuse “is never repeated.”

"I hope you will encourage use of the full report in the future development of CIA training programs, as well as future guidelines and procedures for all Executive Branch employees, as you see fit," Feinstein wrote at the time.

Jessica Schulberg contributed reporting.