President Trump’s lawyers filed a lawsuit Thursday to fight the Manhattan district attorney’s demand for eight years of his corporate and personal tax returns.

“In response to the subpoenas issued by the New York County District Attorney, we have filed a lawsuit this morning in federal court on behalf of the president in order to address the significant constitutional issues at stake in this case,” Jay Sekulow, a lawyer for the president, said in a statement about the suit, which was filed in Manhattan federal court.

The suit asserts that “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,” and asks a federal judge to bar Vance from enforcing the subpoena until Trump leaves office.

The subpoena was served last month on Mazars USA by DA Cyrus Vance Jr.’s office, sources told The Post.

The demand for Trump’s tax records is part of a probe into the $130,000 hush-money payment made to porn star Stormy Daniels by then-Trump lawyer and fixer Michael Cohen ahead of the 2016 election.

Daniels said she had a one-night fling with Trump in 2006, which Trump denied.

The range of the Mazars subpoena shows that Vance was also investigating other matters, a source said.

“If you’re looking at eight years, it’s definitely more than just Stormy Daniels. They’re looking beyond that,” the source said.

Trump Organization lawyer Marc Mukasey accused the DA of attempting a “political hit job” against the commander-in-chief following revelations that Vance had subpoenaed the Trump Organization over Cohen’s payment to Daniels.

Cohen is serving a three-year federal prison term for crimes that include violating campaign finance law and lying to the feds.

Vance launched his probe after federal prosecutors said they had wrapped up their investigation of the payoff to the porn star.

Last year, Trump lawyer Rudy Giuliani said Trump reimbursed Cohen but didn’t know about the deal with Daniels at the time.

Trump has consistently refused to release his tax returns, the only US president in decades not to disclose that information to the American people.

Mazars said in a statement they would cooperate but declined further comment.

“Mazars USA will respect the legal process and fully comply with its legal obligations. As a matter of firm policy and professional rules we do not comment on the work we conduct for our clients,” the statement read.