A federal judge in New York ordered President Trump to turn over eight years of personal and corporate tax returns Monday subpoenaed in an investigation of whether any laws were broken ahead of the 2016 election with the reimbursement of Trump’s attorney for payoffs to silence two women who said they had affairs with the president.

U.S. District Judge Victor Marrero, who was appointed to the bench by Bill Clinton, rejected arguments that sitting presidents are fully immune from criminal investigations and that the inquiry was politically motivated.

Minutes before the ruling, Trump asked the 2nd U.S. Circuit Court of Appeals to put a hold on the case. There’s a two-day grace period before the returns need to be turned over.

The appellate court put a hold on the lower court order until it can examine the case.

Manhattan District Attorney Cyrus R. Vance Jr. subpoenaed the returns in an inquiry into whether campaign finance laws were violated when Trump’s fixer, Michael D. Cohen, was reimbursed for payoffs he made to adult film actress Stormy Daniels in the runup to the 2016 presidential election.

Trump reacted by tweeting the only reason New York is investigating him is because "Democrats have failed on all fronts" on the federal level.

It is unclear whether a sitting president can be charged with criminal activity since the U.S. Constitution is silent on the issue, but the Justice Department has rules granting temporary immunity to sitting presidents. However, that federal immunity does not extend to state-level charges.

In a 75-page decision, Marrero called Trump’s claims “extraordinary.”

“This court cannot endorse such a categorical and limitless assertion of presidential immunity from judicial process,” Marrero said.

Vance subpoenaed records from Trump accountants Mazars USA. Trump tried to block the subpoenas by saying release of his returns would cause “irreparable harm,” and his lawyers argued Vance does not need eight years of returns, calling the subpoena “a bad faith effort to harass the president.”

Vance is investigating payments to Daniels and former Playboy centerfold Karen McDougal. Cohen has said he paid Daniels out of his own pocked but then was reimbursed by the Trump organization. The National Enquirer paid $150,000 to McDougal for her story of an affair with Trump but then killed it. Trump and Enquirer CEO David Pecker are longtime friends.

Unlike other presidential candidates, Trump refused to release his tax returns in advance of the 2016 election, claiming he couldn’t because they were under audit by the Internal Revenue Service. An audit, however, does not preclude disclosure.

Congressional investigators also have subpoenaed Trump’s returns as part of its constitutional oversight duties, but Trump is fighting those subpoenas as well.