NEW YORK – President Donald Trump on Monday lost a federal court battle aimed at keeping a New York prosecutor from examining his tax returns for a criminal investigation when a judge rejected his claim of absolute presidential immunity from criminal investigations.

Trump's attorneys filed a notice of an emergency appeal to an appellate court, however, which responded by blocking an immediate handover of the returns while the appeal is in process.

The decision by U.S. District Court Judge Victor Marrero in New York's Southern District marked a legal victory for Manhattan District Attorney Cyrus Vance. He subpoenaed Trump's tax returns for a criminal investigation into hush money payments to two women who allege they had affairs with Trump.

Marrero issued a 75-page ruling rejecting what he called Trump's "extraordinary claim" that "the person who serves as president, while in office, enjoys absolute immunity from criminal process of any kind."

That claim is too broad, Marrero wrote, because it would represent "virtually limitless" protection from criminal investigations not only for sitting presidents but for associates who might have collaborated in illegal actions.

Marrero wrote that he "cannot endorse such a categorical and limitless assertion of presidential immunity from judicial process" as being acceptable under the U.S. Constitution.

That's especially true given 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," wrote Marrero.

"Hence, the expansive notion of constitutional immunity invoked here to shield the president from judicial process would constitute an overreach of executive power," the judge concluded.

Marrero ruled that Trump would not suffer irreparable harm and was unlikely to succeed on the merits of his legal arguments, so the judge denied Trump's motions for a temporary restraining order and preliminary injunction as he dismissed the subpoena challenge.

William Consovoy, an attorney representing Trump, immediately filed an emergency notice of appeal with the New York-based U.S. Court of Appeals for the Second Circuit. The appeals court issued a stay pending an expedited review and said it would issue a scheduling order for the case.

The appeals court set a Friday deadline for Trump's brief, an Oct. 15 date for Vance's filing, and an Oct. 17 deadline for Trump's response. Oral arguments will be scheduled as early as the week of Oct. 21. The temporary stay will remain in effect until argument is completed, the court said.

Trump's attorney asked in his scheduling request that the court leave the stay in place for a week after the appeals panel of judges issues a ruling "so that the losing party has an opportunity to seek Supreme Court review."

Investigation relates to hush money payments

The legal fight stems from Vance's Aug. 1 grand jury subpoena to the Trump Organization seeking records and communications relating to payments to two women – adult film star Stephanie Clifford, whose stage name is Stormy Daniels, and former Playboy model Karen McDougal – and how the transactions were reflected in the company's records.

Both women claimed to have had sexual affairs with Trump.

Hush-Money payments:Michael Cohen's plea deal exposes President Trump to legal, political trouble

Cohen paid $130,000 to Daniels to buy her silence about her alleged affair with Trump. The payment was made shortly before the 2016 presidential election.

Cohen subsequently pleaded guilty to tax evasion, bank fraud and violations of campaign finance law in connection with payments made to Daniels and McDougal.

Trump's company initially cooperated with Vance's investigation. On Sept. 4, however, the company raised concerns that providing Trump's tax records "implicated constitutional issues," Manhattan Assistant District Attorney Solomon Shinerock wrote in a court filing.

Separately, Vance's office subpoenaed Mazars USA LLP, Trump's longtime accounting firm, seeking some of Trump's returns. Mazars did not raise any objections to the subpoena, Shinerock wrote.

After talks between Vance's office and Trump's attorneys broke down, Trump sued Vance and Mazars in an effort to block them from handing over his returns.

Trump's lawyers say presidents must be protected from politically-motivated investigations

"Virtually 'all legal commenters agree' that a sitting President of the United States is not 'subject to the criminal process' while he is in office," Trump's lawyers wrote in the complaint, citing a 1972 case.

"The Framers of our Constitution understood that state and local prosecutors would be tempted to criminally investigate the President to advance their own careers and to advance their political agendas," Trump's lawyers wrote. "And they likewise understood that having to defend against these actions would distract the President from his constitutional duties."

That's why the Constitution's framers "eliminated this possibility and assigned the task to supermajorities of Congress acting with the imprimatur of the nation as a whole," Trump's lawyers wrote.

The U.S. Department of Justice and the U.S. Attorney's Office for the Southern District of New York filed briefs in Trump's suit backing the president's legal challenge.

They argued a federal judge can step into a case in which someone is trying to halt a state criminal proceeding if there is "bad faith, harassment or any other unusual circumstance that would call for equitable relief," attorneys for the Department of Justice and U.S. Attorney's Office wrote in an Oct. 2nd filing.

Federal courts may also intervene if "the state proceedings [do not] afford an adequate opportunity to raise the constitutional claims," the lawyers added, citing a 1979 legal decision.

Several efforts underway to get Trump's tax returns

The Manhattan case is just one of several lawsuits launched by the president to block disclosure of his financial records. In Washington, Democratic-led congressional committees investigating Trump are locked in legal battles to obtain his tax returns.

Trump and his namesake businesses filed a lawsuit in April to revoke a subpoena issued by the House Oversight and Reform Committee. The panel had demanded that Mazars provide years worth of records, including meeting notes and communications.

That same month, Trump and three of his children sued a pair of banks to prevent them from providing years of the family’s financial records in response to a subpoena by the House Financial Services and Intelligence committees. One of the banks sued is Deutsche Bank, a longtime lender of Trump and his company.

The House Ways and Means Committee sued in July in its effort to obtain Trump’s financial records. The committee, which sued Treasury Secretary Steve Mnuchin and IRS Commissioner Charles Rettig, wants a federal judge to compel the officials to hand over Trump’s returns.

Contributing: Kristine Phillips and Bart Jansen

Read the ruling