The legal fight over whether or not President Donald Trump will have to turn over his tax records — along with a broader constitutional fight over presidential powers — has taken a big step closer to being decided by the highest court in the land.

On Monday, a three-judge panel of the Second Circuit Court of Appeals ruled that Trump's accounting firm must turn over years of his tax records to an investigation being conducted by Manhattan District Attorney Cyrus Vance Jr.

The president's attorneys argued last month that the president is not subject to such criminal proceedings while in office. "The Framers recognized the need for a strong Chief Executive and created a process for investigating and removing him (in) a manner that would embody the will of the people. A lone county prosecutor cannot circumvent this arrangement," one of the president's attorneys wrote. "That the Constitution empowers thousands of state and local prosecutors to embroil the President in criminal proceedings is unimaginable."

While the ruling didn't address whether or not a sitting president may be constitutionally subject to criminal indictment and prosecution, the court ruled on Monday that immunity doesn't extend to investigations.

"[A]fter reviewing historical and legal precedent, we conclude only that presidential immunity does not bar the enforcement of a state grand jury subpoena directing a third party to produce non‐privileged material, even when the subject matter under investigation pertains to the President."

The president's legal team also cited two previous Justice Department memos from 1973 and 2000 that found that sitting presidents are immune to prosecution. The ruling states that both memos "are directed almost exclusively to the question of whether the President may be indicted" and that "neither concludes that a sitting President may not be investigated."

Trump's personal attorney Jay Sekulow, however, said the fight will continue and that the president will appeal the ruling to the Supreme Court.

"We will be taking this case to the Supreme Court," Sekulow said in a statement. "The issue raised in this case goes to the heart of our Republic. The constitutional issues are significant."

A separate case involving a subpoena of Trump's tax information was upheld last month by the D.C. Circuit Court of Appeals. Judge Neomi Rao — a Trump appointee confirmed to the bench earlier this year — dissented.