A federal appeals court ruled Monday that President Donald Trump’s long-fought-over tax returns must be turned over to a state grand jury, setting up the next stage of a fight that will end in the Supreme Court.

“The decision of the Second Circuit will be taken to the Supreme Court. The issue raised in this case go to the heart of our Republic. The constitutional issues are significant,” Trump attorney Jay Sekulow said in a statement after the verdict.

The three-judge panel in New York rejected the claim by Trump’s lawyers that he is immune from criminal investigations while he is the president.

Trump’s lawyers went so far as to claim he could shoot someone on Fifth Avenue in New York City and not be subject to arrest and prosecution until after he leaves office, and that he has absolute immunity until that time, a pretty bold claim the judges flatly rejected.

“Any presidential immunity from state criminal process does not extend to investigative steps like the grand jury subpoena at issue here,” the judges wrote in denying the appeal.

Manhattan District Attorney Cyrus Vance Jr. is looking to get his hands on Trump’s corporate and personal tax returns from Mazars USA, Trump’s accounting firm, as part of a criminal investigation into the president. Trump sued in September to block Mazars from releasing the tax returns.

Vance is reportedly investigating whether the Trump Organization paid for hush money payments to two women who claim to have had affairs with then-citizen Trump, who has of course denied the affairs. Stephanie Clifford, aka Stormy Daniels, was paid $130,000 by lawyer Michael Cohen, Trump’s former fixer who was then reimbursed by Trump.

Playboy model Karen McDougal was paid $150,000 for her silence by the publisher of the National Enquirer, and both payments were made right before the 2016 election.

Cohen is currently serving a three-year prison term and is cooperating with the New York DA’s office. Cohen pleaded guilty last year to a number of crimes, including campaign finance violations in connection to the payments to the two women.