A US federal judge has emphatically rejected President Donald Trump’s challenge to the release of his tax returns to New York prosecutors.

US District Judge Victor Marrero said the president’s broad claim of immunity from all criminal investigations is at odds with the constitution.

But an appeals court blocked the handover of the documents for now.

At issue is a request from Manhattan district attorney Cyrus R Vance Jr that Mr Trump’s accounting firm turn over eight years’ worth of his business and personal tax returns for an investigation into the payment of hush money to two women who claimed to have had affairs with the president.

Judge Marrero turned down Mr Trump’s challenge, saying he could not grant the president a “categorical and limitless assertion of presidential immunity”.

Mr Trump’s lawyers immediately appealed to the 2nd US Circuit Court of Appeals, and it granted a temporary stay of the judge’s ruling “pending expedited review” by the court.

“The Radical Left Democrats have failed on all fronts,” Mr Trump wrote on Twitter, “so now they are pushing local New York City and State Democrat prosecutors to go get President Trump. A thing like this has never happened to any President before. Not even close!”

Mr Trump’s lawyers have said the investigation is politically motivated and the request for his tax records should be stopped because he is immune from any criminal probe as long as he is president.

In striking down Mr Trump’s attempt to block the subpoena, Judge Marrero called Mr Trump’s claim of a broad immunity “extraordinary” and “an overreach of executive power”.

“As the court reads it, presidential immunity would stretch to cover every phase of criminal proceedings, including investigations, grand jury proceedings and subpoenas, indictment, prosecution, arrest, trial, conviction, and incarceration,” Judge Marrero wrote.

“That constitutional protection presumably would encompass any conduct, at any time, in any forum, whether federal or state, and whether the president acted alone or in concert with other individuals.”

The judge said he could not accept that legal view, “especially in the light of the fundamental concerns over excessive arrogation of power that animated the constitution’s delicate structure and its calibrated balance of authority among the three branches of the national government, as well as between the federal and state authorities”.

Justice Department lawyers in Washington, who had urged Judge Marrero to delay deciding the issue, declined to comment.

Mr Vance began his probe after federal prosecutors in Manhattan completed their investigation into payments that Mr Trump’s former personal lawyer, Michael Cohen, arranged to be paid to porn actress Stormy Daniels and model Karen McDougal to keep them silent during the presidential race.

Manhattan district attorney Cyrus R Vance Jr
Manhattan district attorney Cyrus R Vance Jr (Frank Franklin II/AP)

The Trump Organisation later reimbursed Cohen.

Cohen is serving a three-year prison sentence for crimes that included campaign finance violations.

Mr Trump was never charged, though prosecutors said publicly that he was aware of and directed the illegal payments.

Justice Department policy has long been that sitting presidents cannot be charged criminally.

Grand jury proceedings and records in New York are secret.

If Mr Vance gains access to Mr Trump’s returns through a grand jury investigation, that does not mean that their contents would be disclosed publicly.

It is unclear what Mr Trump’s returns might have to do with the criminal investigation.