WASHINGTON (CN) — Upholding a New York City prosecutor’s subpoena for President Donald Trump’s tax returns, the Supreme Court ruled 7-2 Thursday that presidents are not immune from state criminal proceedings while in office.

“Two hundred years ago, a great jurist of our court established that no citizen, not even the president is categorically above the common duty to produce evidence when called upon in a criminal proceeding,” Chief Justice John Roberts wrote for the majority. “We reaffirm that principle today and hold that the president is neither absolutely immune from state criminal subpoenas seeking his private papers nor entitled to a heightened standard of need.”

Separately this morning, the court punted on a related case involving subpoenas of Trump’s financial records from House Democrats. The decisions fell two months after remote arguments where attorneys for Trump and the Justice Department argued the president’s position makes him immune from state-level criminal process and that Congress overstepped its authority in subpoenaing the records.

The decision on the congressional subpoenas sends the dispute back to the lower courts for what Roberts called a more adequate consideration of “special concerns regarding the separation of powers” implicated by the subpoenas.

This makes it unlikely that there will be a final decision on whether Congress can access Trump’s financial records before the November election.

In backing the New York subpoena for Trump’s tax returns, however, the court was more forceful: the Constitution does not grant the president special immunity from state criminal process, Roberts wrote.

Roberts joined the liberal wing of the court in both cases, as did Justices Brett Kavanaugh and Neil Gorsuch, both Trump appointees. In both cases, Justices Samuel Alito and Clarence Thomas each penned separate dissents.

The case out of New York evolved from a grand jury subpoena Manhattan District Attorney Cyrus Vance issued to Trump’s longtime accounting firm Mazars USA as part of an investigation into the hush money paid to adult film actress Stormy Daniels, who claims to have had an affair with Trump in 2006.

Trump filed suit before Mazars could hand over the sought-after tax returns, only to see his challenge eviscerated by a New York federal judge and defeated again by the Second Circuit.

Winding back to former Vice President Aaron Burr’s criminal trial in the early 19th century, Roberts noted Chief Justice John Marshall upheld a subpoena Burr sought to obtain documents from President Thomas Jefferson.

That decision, Roberts wrote, set a precedent that presidents followed for nearly two centuries until President Richard Nixon fought a special prosecutor’s subpoena for records of his meetings in the Oval Office.

Against this extensive backdrop, Roberts quickly dispatched with Trump’s argument that facing the subpoena would distract him from his official duties.

Other longstanding court precedents are sufficient to ward off Trump’s concerns that state prosecutors will issue wave after wave of subpoena meant to harass the president, Roberts wrote.

Roberts also declined the Justice Department’s invitation to require state prosecutors show a heightened need for a presidential subpoena. Such a standard would give protections to the president’s private documents that were meant solely for official business and hamper the public interest in giving a grand jury access to the full array of documents necessary to conduct a thorough investigation.

Nevertheless, Roberts acknowledged Trump may still raise further arguments against the subpoena in lower court as the litigation continues.

Separately, Trump filed suit to block subpoenas from three House committees, Oversight, Financial Services and Intelligence, which sought broad categories of his financial records.

The House Oversight subpoena went to Mazars and is virtually identical to the Vance subpoena, except Vance tacked on the request for tax returns. The committee justified the request for years of Trump’s financial records as part of its review of whether Congress should update government ethics and conflict-of-interest laws.

The House Financial Services and Intelligence Committees justified their subpoenas to Deutsche Bank and Capital One as part of broad probes into money-laundering and unsafe-lending laws, as well as foreign interference in the 2016 presidential election.

The D.C. Circuit and Second Circuit each upheld the subpoenas, finding the committees had supported them with a valid legislative purpose.

Vacating those rulings in the second opinion, Roberts emphasized the careful scrutiny that congressional subpoenas demand, “for they stem from a rival political branch that has an ongoing relationship with the president and incentives to use subpoenas for institutional advantage.”

“When Congress seeks information ‘needed for intelligent legislative action,’ it ‘unquestionably’ remains ‘the duty of all citizens to cooperate,'” the ruling on the House subpoena concludes. “Congressional subpoenas for information from the president, however, implicate special concerns regarding the separation of powers. The courts below did not take adequate account of those concerns.”

Justices Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan joined both of the Roberts opinions in full. Gorsuch and Kavanaugh concurred in judgment in the New York case but otherwise joined the ruling on the House subpoenas in full.