Former White House counsel Donald McGahn may defy a congressional subpoena, a federal appeals court in Washington ruled Friday in a decision siding with President Trump, who had blocked top advisers from testifying as part of the impeachment proceedings.

The 2-to-1 ruling, which can be appealed, deals a sweeping blow to Congress’s investigative powers. The decision means Trump’s former lawyer cannot be compelled to appear on Capitol Hill, and it comes after Democrats lost their bid to call additional witnesses during Trump’s Senate impeachment trial.

The Justice Department had argued that the Constitution categorically bars the courts from stepping into this kind of dispute between the politically elected legislative and executive branches.

The court majority agreed and dismissed the case, finding it has no authority to resolve the issue.

Congress and the White House are “locked in a bitter political showdown that raises a contentious constitutional issue: The Committee claims an absolute right to McGahn’s testimony, and the President claims an absolute right to refuse it,” wrote Judge Thomas B. Griffith, who was joined by Judge Karen LeCraft Henderson.

“We cannot decide this case without declaring the actions of one or the other unconstitutional, and ‘occasions for constitutional confrontation . . . should be avoided whenever possible,’” wrote Griffith, like Henderson a Republican presidential appointee.

In a 20-page concurring opinion, Henderson balked at a sweeping concession of judicial power, rejecting Griffith’s “categorical stance” that neither Congress nor either house of Congress alone may resort to the courts “in any interbranch dispute.”

Henderson also rejected a Trump administration claim that top White House aides enjoy “absolute immunity” against compelled testimony, saying the assertion is “a step too far, again, under Supreme Court precedent.”

In a 31-page dissent, Judge Judith W. Rogers warned that the court had fatally compromised Congress’s ability to check presidential power.

The Constitution’s framers intended to give Congress a fail-safe method to enforce accountability, Rogers wrote.

“The power to impeach and remove the President from office distinguished the President from a king. . . . The Founders well knew the destructive power of unchecked and uncheckable authority in the hands of a single person,” Rogers’s dissent said.

Rogers acknowledged the unique precedent the Trump administration has set in refusing to cooperate with the congressional investigation and said her colleagues’ opinion encourages “Presidential stonewalling.”

Rogers, a Democratic presidential appointee, wrote that “the Supreme Court and this court have long recognized that the ability to acquire information is indispensable to Congress’s performance of its constitutional roles” and that “the power of inquiry, including the power to issue a subpoena and thereby compel a witness to appear before the House, is critically important to the efficacy of the impeachment power.”

House Speaker Nancy Pelosi (D-Calif.) said in a statement late Friday that the House would seek a rehearing by the full court. “We will continue to honor our responsibility to exercise our constitutional authority to conduct oversight on behalf of the American people, including by issuing our lawful and legitimate subpoenas,” Pelosi said.

Elizabeth Wydra, president of the Constitutional Accountability Center, said in a statement that the ruling “threatens to weaken Congress’s ability to perform its constitutional duty and its role in our tripartite governmental structure. Whether in service of its investigative or legislative functions, Congress needs to be able to access information.”

The judges were reviewing a November decision from U.S. District Judge Ketanji Brown Jackson, who upheld the House Judiciary Committee’s August subpoena for McGahn. The judge rejected the White House’s broad claim that top advisers like McGahn are “absolutely immune from compelled congressional testimony” and the assertion that the president can overrule current or former aides’ “own will to testify.”

If McGahn wanted to refuse to testify — by invoking executive privilege, for instance — the judge said he had to do so in person, and question by question.

Trump had blocked McGahn’s testimony, saying the key presidential adviser could not be forced to answer questions or turn over documents. At oral argument on Jan. 3, Justice Department attorney Hashim Mooppan urged the court to stay out of a political dispute between Congress and the White House. He said choosing sides would undermine “public confidence in the court.”

The lawsuit was filed before the formal start of impeachment proceedings and the House vote in December to impeach Trump for his alleged effort to pressure Ukraine to conduct investigations that would benefit his reelection campaign. The Senate voted to acquit Trump on Feb. 5.

The committee had asked the court to enforce its subpoena for McGahn, who lawmakers have said is the “most important” witness on the question of whether Trump obstructed justice in special counsel Robert S. Mueller III’s investigation of Russian interference in the 2016 election.

Before Trump was acquitted, House lawyers told the court in early January that McGahn’s testimony was still critical to “ongoing inquiry into the president’s conduct” and suggested a third article of impeachment was “on the table.”