Invoking an emergency procedure Wednesday evening, the Justice Department appealed a judge’s order that would force the government to turn over at least 56 documents that might shed light on why mortgage finance giants Fannie Mae and Freddie Mac were effectively nationalized in August 2012.

The department argues that Court of Federal Claims judge Margaret Sweeney’s 80-page order on September 20, rejecting the government’s claims of executive privilege over those documents, engaged in “cursory” and “uncritical, rote analysis,” and rested “on a misunderstanding of the principles that govern the privileges.”

The action comes in a set of consolidated lawsuits filed by shareholders of the two Fortune 50 companies who say that the 2012 event—in which the Treasury Department and Federal Housing Finance Agency (FHFA) dramatically altered the terms of the two firms’ federal bailouts, all but wiping out the value of their stock—amounted to a “taking” of property without just compensation in violation of the Fifth Amendment to the U.S. Constitution. (The bailout began in early September 2008, on the eve of the financial crisis, when FHFA, with Treasury’s approval, placed the two government sponsored enterprises into conservatorship.)

Because Judge Sweeney’s order is not subject to ordinary appeal, the government is taking the issue to the appellate court—the U.S. Court of Appeals for the Federal Circuit—by means of a procedural mechanism known as “mandamus.” Mandamus is considered an extraordinary remedy reserved for instances in which a judge has committed clear error or an abuse of discretion that will have severe, irreversible consequences. The device has sometimes been used successfully in the past to challenge orders rejecting privilege claims.

“We firmly believe that Judge Sweeney correctly rejected the government’s claims of privilege,” says Charles Cooper, the lead attorney for plaintiff Fairholme Funds, in an interview, “and we will strenuously oppose the government’s petition for mandamus.” Fairholme, a group of mutual funds founded by activist investor Bruce Berkowitz, has led the charge to wrest the documents into the open.

By merely bringing the mandamus petition, however, the government has already made it more challenging for Fairholme’s attorneys to achieve one of their objectives. Ideally, they would like to get their hands on the documents in time to show them to a different federal appeals court—the U.S. Court of Appeals for the D.C. Circuit—before the latter issues a ruling in a related set of cases challenging the same 2012 event.

The D.C. Circuit is now reviewing the September 2014 decision of U.S. District Judge Royce Lamberth in Washington, D.C., who threw out a number of investor suits challenging the 2012 change in bailout terms on a different legal theory: namely, that Treasury and FHFA exceeded their federal statutory powers when they did so. The investors in the cases before Lamberth were not entitled to discovery, but Fairholme’s attorneys have been bringing to the D.C. Circuit’s attention documents Fairholme has already successfully harvested through the discovery process before Judge Sweeney, and they had hoped to show that court these 56 documents, too.

Because the D.C. Circuit heard oral arguments on Judge Lamberth’s ruling in April, it could render a decision any day.

In the mandamus petition filed Wednesday, the government contends that the 56 documents at issue before Judge Sweeney—which were generated at the Treasury Department, the Federal Housing Finance Agency, or the White House—are protected by at least three evidentiary privileges designed to ensure that federal executive officials can have frank and open discussions of important policy issues: the “deliberative process privilege,” the “bank examiners privilege,” and—weightiest of all—”presidential privilege.”

The government claimed presidential privilege for four of the 56 documents, which are memos or emails that contain input from President Barack Obama’s then National Economic Council director Gene Sperling, deputy director Brian Deese, and senior advisor James Parrott. Sperling is currently acting as an economic advisor to Democratic presidential candidate Hillary Clinton.

Although Judge Sweeney’s order specifically concerns 56 documents, which she reviewed in her chambers, they were selected by plaintiffs lawyers from among some 12,000 documents for which the government had asserted privileges. Based on how the documents were described in the government’s “privilege log”—a list a litigant is required to draw up when it is refuses to produce a document on the basis of a privilege—the investors’ lawyers chose those specific 56 as representative of all 12,000. (Presumably, they chose the ones that looked the juiciest, too.)

The expectation was that the court’s resolution of the fate of the 56 documents would shed light on how the government should handle the remaining thousands. Since Judge Sweeney found none of the first 56 to be protected, the implication was that few, if any, of the rest would be protected.

Which is certainly how the Justice Department also appears to have understood Sweeney’s order. “Intervention by this court is required,” the department urged in its mandamus petition, “to avoid the en masse negation of crucial government privileges.”

Notwithstanding the filing of its petition yesterday, the government will still need to obtain a stay of Sweeney’s order—either from Sweeney herself or from the Federal Circuit—in order to keep from having to turn over the 56 documents to the plaintiffs’ lawyers in the meantime.

Fairholme and other investors are likely to oppose such a stay, arguing that the protective order Judge Sweeney already has in place—generally preventing lawyers in the case from showing any documents they receive through discovery to the public or even to their own clients—will prevent any harm to the government pending resolution of its appeal of the privilege ruling. (Almost all of the documents the investors’ attorneys have shown the D.C. Circuit so far, for instance, have remained under seal, unavailable to the public and, indeed, to the investors’ themselves.)

The cases before Sweeney and Lamberth all arise from the following facts. In September 2008, with residential mortgage defaults skyrocketing, FHFA’s director placed Fannie and Freddie into conservatorship.

Over the next four years the GSEs received, under the terms of special bailout legislation, $189.5 billion in taxpayer money. In exchange, they issued special “senior preferred stock” to the Treasury under which they had an obligation to pay 10% interest on the bailout money they’d received. In 2012, the GSEs began to make money again, together posting a healthy $8 billion in profits for the second quarter.

But in August 2012, a few days after those profits were posted, Treasury and FHFA suddenly changed the terms of the GSEs’ special preferred stock. They replaced the 10% interest obligation with a requirement that the GSEs instead pay Treasury their entire profit each quarter in perpetuity (except for a small capital reserve that would gradually dwindle to nothing by 2018). Due to this new regime—known as the Net Worth Sweep—it now appeared that the GSEs would never emerge from conservatorship, and would, rather, be eventually wound down and replaced with some other system of housing finance to be set up by Congress.

Government officials have claimed that they took this action because they feared the GSEs would start losing money again, with taxpayers still being on the hook. In the months immediately following the momentous switch, however, the GSEs actually booked record profits. As of last November, by which time thousands of Fannie and Freddie investors—led by Fairholme and hedge fund Perry Capital—had filed numerous suits in numerous courts, the GSEs had paid the government about $240 billion in exchange for the $189.5 billion bailout, or nearly $130 billion more than they would have paid under the original 10% coupon agreements.

Lawyers for the investor plaintiffs have speculated that the Treasury and FHFA officials responsible actually knew that the GSEs were healthy in 2012 (and possibly even in 2008) but confiscated their assets for opportunistic budgetary reasons, including, perhaps, the desire to postpone hitting the national debt ceiling at a time when Congress was threatening to shut down the government. They have sought disclosure of Treasury, FHFA, and White House documents in order to try to prove this theory.