WASHINGTON - A judge has ordered US President Donald Trump to hand over eight years of his tax returns to New York investigators.

The judge rejected arguments by the president's lawyers that Mr Trump enjoyed total immunity while in office.

The ruling helps an investigation into hush money paid to two women who claim they had affairs with Mr Trump.

Prosecutors said in a court filing that every US president since Jimmy Carter had voluntarily released his tax returns before or upon taking office.

In his 75-page decision on Monday, Judge Victor Marrero called the president's claim of immunity "repugnant to the nation's governmental structure and constitutional values", writing that he would not allow a "categorical and limitless assertion of presidential immunity from judicial process".

"The only thing truly absolute about presidential immunity from criminal process is the Constitution's silence about the existence and contours of such an exemption," he wrote.

The president tweeted about the ruling on Monday, claiming that Democrats were "pushing local New York City and State Democrat prosecutors to go get President Trump".

No, because the president's lawyers immediately filed an appeal, and the 2nd US Circuit Court of Appeals granted a temporary stay of Judge Marrero's ruling "pending expedited review" by the court.

If the judge's ruling is not overturned, the New York state district attorney can enforce an earlier legal demand he issued to Mr Trump's accountants for the tax returns, personal and corporate, from 2011-18.

But these records may not become public even if the appeal fails, as they would be protected by the state's grand jury case laws.

The investigation concerns alleged hush money payments made by Mr Trump's former lawyer Michael Cohen to two women - adult film star Stormy Daniels and former Playboy model Karen McDougal - who both say that they had affairs with Mr Trump. The president denies the affairs took place.

Manhattan district attorney Cyrus Vance Jr is looking into whether Mr Trump's organisation broke any election campaign laws by reimbursing Mr Cohen for the payments.

Mr Vance said that the president had "not been identified as a defendant nor is there an assumption he will be", the Washington Post reported.(FA)