A federal appeals court ruled Monday that President Donald Trump's tax returns must be turned over to Manhattan District Attorney Cyrus Vance, who had subpoenaed the documents from Trump's accounting firm as part of an investigation into the pre-election payoffs to two women who alleged affairs with Trump.

Trump's lawyer Jay Sekulow said he would appeal the case to the Supreme Court. Trump had earlier lost the initial case before a federal district court, and it was since fast-tracked.

"The decision of the Second Circuit will be taken to the Supreme Court," Sekulow said. "The issue raised in this case goes to the heart of our Republic. The constitutional issues are significant."

The three-judge panel wrote in their decision that "any presidential immunity from state criminal process does not extend to investigative steps like the grand jury subpoena at issue here," affirming the lower court's ruling on that question.

Vance is seeking to obtain eight years of Trump's tax documents through his account firm, Mazars USA, to evaluate the Trump Organization's role in the payouts to porn star Stormy Daniels and ex-Playboy model Karen McDougal, as well as the reimbursements made to Trump's former longtime attorney Michael Cohen, who is now serving a three-year federal prison sentence for a litany of crimes, including campaign finance violations. Daniels and McDougal claimed to have had affairs with Trump, allegations he has denied.

Because the tax documents were requested under a grand jury subpoena, it's unlikely they will become public if turned over. Trump is engaged in a series of legal battles across the country to keep his tax returns private.

Download the NBC News app for breaking news and politics

In this case, the president has argued that state authorities cannot investigate a sitting president — even if he were to shoot someone in the middle of Fifth Avenue in New York City — and that the immunity provides blanket coverage for his business, family members and business associates. Last week, one of the three federal judges, Denny Chin, asked Trump attorney William Consovoy if local authorities could investigate Trump for shooting someone in the middle of Manhattan while he's in office. "No," Consovoy said.

"This appeal does not require us to consider whether the president is immune from indictment and prosecution while in office, nor to consider whether the President may lawfully be ordered to produce documents for use in a state criminal proceeding," the judges wrote in Monday's ruling. "We accordingly do not address those issues. The only question before us is whether a state may lawfully demand production by a third party of the President’s personal financial records for use in a grand jury investigation while the President is in office."

"With the benefit of the district court’s well‐articulated opinion, we hold that any presidential immunity from state criminal process does not bar the enforcement of such a subpoena," they continued.

The Constitution does not provide explicit guidance on whether a president can be charged with a crime while in office, though a Nixon-era Justice Department Office of Legal Counsel memo that has proven influential in past investigations involving Trump states a president cannot be charged while in office. That memo does not explicitly cover the act of investigating a sitting president. And Vance, who is a state official, is not bound by that guidance.

The judges said that neither the Nixon-era memo nor a Clinton-era one conclude "that a sitting president may not be investigated."

"Moreover, the president concedes that his immunity lasts only so long as he holds office and that he could therefore be prosecuted after leaving office," the judges wrote. "There is no obvious reason why a state could not begin to investigate a president during his term and, with the information secured during that search, ultimately determine to prosecute him after he leaves office."

In the earlier district court ruling, U.S. District Court Judge Victor Marrero called Trump's claim to immunity from investigation "unqualified and boundless," writing that the argument was "repugnant to the nation's governmental structure and constitutional values."