President Donald Trump, under siege from House Democrats weighing impeachment, suffered a stinging blow as a federal appeals court upheld a subpoena ordering his accountants to provide Congress with his financial records.

The ruling, by a divided three-judge panel of the U.S. Court of Appeals in Washington, means Trump will lose control of his long-secret financial records at Mazars USA LLP unless the full court reconsiders the decision or the U.S. Supreme Court blocks it.

In their 2-1 decision, the judges rejected arguments made by lawyers for the president that the House Oversight and Reform Committee had no legitimate legislative reason to seek the information.

 “Disputes between Congress and the president are a recurring plot in our national story,” U.S. Circuit Judge David Tatel wrote in the majority’s 66-page opinion. “And that is precisely what the Framers intended.” He quoted the late Supreme Court Justice Louis Brandeis, who said that the purpose of the separation of powers was “to save the people from autocracy.”

The ruling comes just days after a federal judge in New York rejected Trump’s challenge to a separate, state subpoena requiring Mazars to turn over Trump’s tax filings and other financial records to New York prosecutors, though the president won a last-minute delay pending an emergency appeal.

Friday’s majority opinion called the House subpoena “a valid exercise of the legislative oversight authority because it seeks information important to determining the fitness of legislation to address potential problems within the Executive Branch and the electoral system.” The court said the document demand “does not seek to determine the President’s fitness for office.”

Trump, the Trump Organization and the president’s three oldest children have steadfastly refused to surrender their records to Congress. Armed with the papers, Democratic lawmakers say, they could better explore any conflicts of interest in the executive branch and whether the president has violated the Constitution’s emoluments clauses.

“There’s a lot of speculation, but it seems that the accounting firm has tax returns and other documents that will show President Trump and his family and associates involved in all sorts of deals,” Washington lawyer David Dorsen, who served as assistant chief counsel to the U.S. Senate’s Watergate Committee in the 1970s, said in an interview. Lawmakers will want to know whether documents show “payoffs to people in Russia, Ukraine and elsewhere,” he said.

“That would be an enormous, enormous factor in what’s going on now,” Dorsen said.

U.S. Circuit Court Judge Neomi Rao, who was named to the bench by Trump, dissented from the opinion by Tatel and Patricia Millett, both appointees of Democratic presidents. She said Congress can investigate allegations of illegal conduct against the president only as part of an impeachment process and not through its legislative power.

“Allowing the Committee to issue this subpoena for legislative purposes would turn Congress into a roving inquisition over a co-equal branch of government,” she wrote.

Trump’s lawyers could ask the full appeals court to consider the matter, or go straight to the Supreme Court for an emergency review of the ruling, which doesn’t take effect for at least seven days.

“We are evaluating the opinion and reviewing all options, including appeals,” said Jay Sekulow, a lawyer for Trump.

Congress’s demand for the business records came before it began its impeachment inquiry. That later probe was triggered by a whistle-blower’s claim that Trump had asked Ukraine’s president to investigate Democratic presidential candidate Joe Biden and, in a quid pro quo, held back military aid Congress had appropriated to resist Russian influence in the region.

But the disclosures made possible by Friday’s ruling pose further risks for the president if they raise new questions about him, his finances or his companies.

The court said the evidence sought by the subpoena was sufficiently tied to the subject of the House committee’s investigation, and rejected Trump’s argument that the real purpose of the subpoena was to determine whether he has violated the law -- a law enforcement function that belongs to the executive branch, not to Congress.

The majority also noted that Congress wasn’t seeking presidential records and questioned whether Trump, who sued in his individual capacity to block the subpoena, “carries the mantle of the Office of the President” in the case.

“Indeed, for six of the eight years covered by the subpoena, President Trump was merely Mr. Trump or Candidate Trump,” the two judges wrote.

They rejected arguments that the House violated its own rules by allowing the committee to issue the subpoena without the authority of the full body.

In her dissent, Rao wrote that “the most important question is not whether Congress has put forth some legitimate legislative purpose, but rather whether Congress is investigating suspicions of criminality or allegations that the President violated a law.” She said the House “may not use the legislative power to circumvent the protections and accountability that accompany the impeachment power.”

The majority warned that the logic of Rao’s dissent “would reorder the very structure of the Constitution” and “impose upon the courts the job of ordering the cessation of the legislative function and putting Congress to the Hobson’s Choice of impeachment or nothing.”

Representative Elijah Cummings, chairman of the House Oversight Committee, said in a statement the ruling was “a fundamental and resounding victory for Congressional oversight, our Constitutional system of checks and balances, and the rule of law.”

Breaking with four decades of presidential tradition, Trump has declined to make his detailed financial records public. Acting in his personal capacity rather than as president, he sued in April to stop Mazars from handing over his records after they had been subpoenaed by the House committee. He lost in federal district court in May and appealed.

Democrats told the appellate panel on July 12 that they need the Trump records as they consider mandating heightened disclosure requirements for those who hold high office. Trump argued that Congress’s request had no legitimate legislative purpose and should be rejected. The accounting firm took no position.

The Mazars case is one of several testing Congress’s power to obtain a sitting president’s financial records in the name of oversight, with significant implications for the relationship between the executive and legislative branches.

A federal appeals court in New York is weighing a similar request for records from Trump’s bankers at Capital One Financial Corp. and Deutsche Bank AG. The president is also embroiled in lawsuits with the House Ways and Means Committee, which is trying to get six years of Trump tax records from the U.S. Internal Revenue Service and has the standing right to request similar information from the state of New York.

Meanwhile, the Mazars records have been targeted by Manhattan District Attorney Cyrus Vance Jr.; the federal judge in Manhattan ordered Mazars to comply with the subpoena, but Trump has appealed.

A ruling in the president’s favor in the House Oversight case would have been “a very significant change in the balance of power,” said David Sklansky, a law professor at Stanford University, “because it would represent a significant narrowing of congressional subpoena power.”

The case is Trump v. Mazars USA LLP, 19-5142, U.S. Court of Appeals, District of Columbia Circuit (Washington).