For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

President Donald Trump lost a major case before a federal appeals court in DC on Friday that, if it stands pending a possible appeal, will allow congressional Democrats to finally obtain years of his tax returns. But this defeat came despite a dissent from one of Trump’s more radical judicial appointees who showed a willingness to limit Congress’ investigative powers and overturn Supreme Court precedent in order to protect the president—going so far as to claim that Congress could only investigate the president if it had declared an impeachment inquiry.

“Investigations of impeachable offenses simply are not, and never have been, within Congress’s legislative power,” Judge Neomi Rao wrote in her dissent.

As soon as the DC Circuit Court of Appeals three-judge panel released its decision, Rao’s dissent shocked the legal community. Former acting solicitor general in the Obama administration Neal Katyal called it “whackadoodle,” “nutso,” and “profoundly antidemocratic.”

“Rao’s dissent is extraordinary,” tweeted Elizabeth Wydra, the president of the Constitution Accountability Center, a progressive legal group that filed a brief in support of the House Democrats’ case. It “ignores that Congress has very broad authority to investigate—far beyond the power of impeachment—and seems to suggest that courts have some say over the scope of impeachable offenses (they don’t).”

Trump may appeal to the US Supreme Court, but even legal experts who believe that the current conservative majority on the US Supreme Court is too deferential to Trump have expressed doubt that a majority of the justices will side with Rao. But whatever comes next, Rao’s dissent remains a warning to Democrats of the fact that Trump has filled the judiciary with judges who he believes will protect him from investigations. As Newt Gingrich said last year when asked if the courts would force Trump to disclose his tax returns—the very issue in this case—”we’ll see whether or not the [Supreme Court Justice Brett] Kavanaugh fight was worth it.”

This spring, the House Oversight and Reform Committee issued a subpoena to Trump’s accounting firm requesting eight years of his tax returns. The committee issued the subpoena following testimony from Trump’s former attorney Michael Cohen. Congress has broad authority to launch investigations and issue subpoenas in order to fulfill its legislative purpose. Trump, in his personal capacity, sued the committee to block the subpoena, arguing that it lacked a “legitimate legislative purpose”—that the Congress’ purported purpose was invalid because it was a cover to investigate Trump. The majority opinion from the DC Circuit Court of Appeals dismissed this idea.

But Rao did not. In her dissent, she argued that Congress cannot investigate a president for criminal conduct unless it has launched an impeachment investigation—and even then, seemed to buck historical and Supreme Court precedent to argue that the courts may determine when an impeachment inquiry is valid. “The House cannot target conduct that could constitute a high crime or misdemeanor through the legislative power,” Rao writes, essentially asserting—without citing supporting law or precedent—that when a congressional investigation bumps into the possibility of serious misconduct by the president it must stop its investigation and instead open an impeachment inquiry.

Rao, who filled the appellate seat vacated when Brett Kavanaugh was elevated to the Supreme Court last year, is a former Trump administration official who worked on deregulation during her stint in the White House. Her record came under scrutiny during her confirmation, including her reactionary college writings which pilloried feminists, environmentalists, multiculturalism, and affirmative action. Her dissent in this case showed a willingness to bust through past precedent and create new law to grow the power of the executive branch. Despite the growing understanding that recent presidents, including George W. Bush, Barack Obama, and Trump have continuously expanded the power of the executive, Rao’s dissent openly worries that it is the legislative branch whose powers the majority of the court is recklessly expanding. “Allowing the Committee to issue this subpoena for legislative purposes,” she wrote, “would turn Congress into a roving inquisition over a co-equal branch of government.”

Rao’s dissent makes the case that Congress cannot investigate possible criminal wrongdoing by a president unless it has begun an impeachment inquiry. “Allegations of illegal conduct against the President cannot be investigated by Congress except through impeachment,” she wrote. Under this logic, no investigation could touch illegal actions by a president unless Congress first announced an impeachment investigation—forcing the legislative branch to pursue impeachment merely to carry out its basic inquiries and legislation-related investigations that touch on the president.

“The dissent would reorder the very structure of the Constitution,” Judge David Tatel, a Bill Clinton appointee, wrote in his majority opinion. “Throughout history, the Constitution has left to Congress the judgment whether to commence the impeachment process. But the dissent’s approach would not even allow Congress to make the quintessentially legislative judgment that some concerns about potential misconduct or illegality are better addressed through oversight and legislation than impeachment.”

But even if Congress declared an impeachment investigation, Rao hints in her dissent that she believes courts should have the authority to find Congress’ investigative subpoenas invalid. Though impeachment is a political process determined entirely by Congress—as the Supreme Court has previously affirmed—Rao states that the Constitution limits the offenses for which a president can be impeached.

The implications for this are extraordinary: Rao contemplates that the courts may have the power to step in and limit or otherwise declare invalid an impeachment inquiry. The logical conclusion of Rao’s dissent is thus a catch-22 that strips Congress of both its power to investigate and to impeach: If Congress wants to investigate possible criminal violations by the president, even for legislative reasons, it must first open an impeachment investigation—yet if such an investigation is not considered valid by the courts, the subpoenas and the impeachment effort more generally can be voided by judges.

This is, of course, the Trump administration’s goal. His lawyers have similarly argued in recent days that the impeachment investigation is invalid, as are Congress’ subpoenas. It’s unclear how many judges Trump has appointed who agree with him, but this case—and several others over Congressional subpoenas—will test whether more of his judicial picks, including his two appointees to the Supreme Court, are willing to kneecap Congress’ investigatory powers. In Rao, Trump has at least one.