President Donald Trump covers his face from TV lights as he walks towards the media on the South Lawn of the White House in Washington, before his departure to New York, November 2, 2019.

Attorneys for President Donald Trump asked the Supreme Court on Thursday to let him keep his tax returns secret, setting up a case that could determine whether any president has blanket criminal immunity while in office.

The case also marks the first time the president's personal financial dealings have made their way to the nation's top court.

If the justices agree to consider the case, it will pave the way for a landmark dispute over the reach of presidential immunity in the midst of the 2020 presidential campaign and a historic impeachment battle in Congress.

The court could also decline to hear the case, effectively requiring the disclosure of Trump's returns. In the filing, the president's counsel Jay Sekulow emphasized the importance of hearing the matter.

"Every time a President has asked the Court to review an unprecedented use of legal process against the occupant of the office, it has done so," he wrote.

It takes four justices to vote to hear a case.

The president is seeking to have the top court overturn a federal appeals court ruling from earlier this month ordering the president's accounting firm to turn over eight years of the president's corporate and personal tax returns to the Manhattan District Attorney's office in response to a subpoena.

Calling it the "first time in our nation's history" that a local prosecutor has launched a criminal investigation of the president, Sekulow urged the court to take the case "to decide the important and unsettled issue this dispute raises."

That question, he wrote, is "whether the District Attorney's issuance of criminal process demanding the President's records violates the immunity that he holds under Article II and the Supremacy Clause of the Constitution."

Details of the underlying New York investigation are unclear. Manhattan District Attorney Cyrus Vance Jr. has said the investigation concerns potential violations of state law, though no defendants have been publicly named.

Vance's office is investigating at the very least how the Trump Organization accounted for hush-money payments made to two women, porn star Stormy Daniels and Playboy model Karen McDougal, in the months before the 2016 president election.

Trump's then-personal lawyer and fixer Michael Cohen personally paid Daniels $130,000, and the publisher of the Trump-friendly National Enquirer supermarket tabloid newspaper paid McDougal $150,000. Both women have claimed they had sex with Trump, who denies their allegations.

Cohen is serving a three-year prison term for crimes that include campaign finance violations for facilitating the payments, which he admitted were done to shield Trump during the election from negative publicity. He was reimbursed by both Trump's company and the president himself for his payments to Daniels.

The president's legal team has put forward a sweeping view of presidential immunity in the case. They have argued that Trump is immune from criminal investigation while in office.

In October, when he was arguing the case before the Second Circuit Court of Appeals, Trump's lawyer William Consovoy told a three-judge panel that a president is immune not only from federal prosecution, as the Justice Department has said, but also cannot be legally prosecuted or even criminally investigated by any law enforcement agency, be it federal or state.

When Consovoy was asked by Judge Denny Chin if Trump could not be prosecuted for shooting someone on Fifth Avenue, the lawyer suggested Trump could be once he left the White House.

But Chin pressed Consovoy: "I'm talking about while in office. Nothing could be done? That's your position?" Chin asked.

Consovoy replied: "That is correct."

The 2nd U.S. Circuit Court of Appeals did not address that issue, but instead held more narrowly that any immunity afforded to the president does not bar the enforcement of a subpoena on a third party. Trump's attorneys immediately vowed to bring the case to the Supreme Court, saying the issue raised "goes to the heart of our Republic."

Sekulow wrote in the petition that the fact that the subpoena was issued to a third party "does not alter the calculus."

In a statement, Sekulow said that "we are hopeful that the Supreme Court will grant review in this significant constitutional case and reverse the dangerous and damaging decision of the appeals court."

A separate case over the president's tax returns, brought by congressional Democrats, is pending in Washington. A divided U.S. Circuit Court of Appeals in the District of Columbia ruled on Wednesday that it would let stand an earlier ruling requiring Trump's accounting firm, Mazars, to turn over his financial records to the House Oversight Committee.

The president's lawyers have vowed to bring that case to the Supreme Court as well.

Trump is the first president in more than 40 years not to voluntarily make his tax returns public.

The nine-member Supreme Court includes two Trump appointees, Justices Neil Gorsuch and Brett Kavanaugh. It has a 5-4 conservative majority. The court's term ends in June.

If the Democratic-led House of Representatives votes to approve articles of impeachment, as seems likely, Chief Justice John Roberts will preside over the president's trial in the Senate. That trial could come early next year.

Read the full petition: