President Donald Trump filed a lawsuit Thursday against Manhattan District Attorney Cyrus Vance, who subpoenaed Trump's accounting firm for eight years of Trump's personal and corporate tax returns earlier this month.

The subpoena stems from Vance's criminal investigation into the Trump Organization about hush money payments made to two women who have alleged affairs with the president. Trump has strongly denied the affairs.

The lawsuit, filed in the U.S. District Court for the Southern District of New York, names Vance and the president's tax preparer, Mazars USA, as defendants. It argues that the Manhattan district attorney should not receive Trump's tax returns because "'[v]irtually all legal commenters agree' that a sitting President of the United States is not 'subject to the criminal process' while he is in office.”

“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,” the lawsuit adds. "And they likewise understood that having to defend against these actions would distract the President from his constitutional duties. That is why the Framers eliminated this possibility and assigned the task to supermajorities of Congress acting with the imprimatur of the nation as a whole."

Jay Sekulow, the president's lawyer, commented on the constitutionality of Vance's probe in a statement Thursday, saying, “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."

Vance's spokesman Danny Frost said in response to the lawsuit,"We have received the plaintiff’s complaint and will respond as appropriate in court. We will have no further comment as this process unfolds in court.”

Vance's office is probing hush money payments made during the 2016 election to adult film star Stormy Daniels and ex-Playboy model Karen McDougal, both of whom have alleged affairs with Trump, which he has denied.

In addition to Trump's company, Vance's office has also subpoenaed the publisher of the National Enquirer, The New York Times has reported. The publication was involved in negotiations with adult Daniels, whose real name is Stephanie Giffords, and paid $150,000 to silence McDougal, according to federal prosecutors.

The president’s former personal attorney, Michael Cohen, admitted in August of last year to making an illegal $130,000 payment to Daniels in order to keep her quiet in the days ahead of the 2016 election. Cohen is currently serving a three-year prison sentence for tax evasion, bank fraud, breaking campaign finance laws with the hush money payments, and lying to Congress.

Prior to his congressional testimony earlier this year, Cohen released copies of two checks with the president’s signature, which he said was used to reimburse him for his payment to Daniels. NBC News has previously reported that Cohen was cooperating with prosecutors in the Manhattan District Attorney's Office.

Last year, American Media Inc., the Enquirer's parent company, entered into a nonprosecution agreement with federal prosecutors and admitted that it worked with the Trump campaign to buy the rights to the women's stories in order to silence them. The practice, known in the industry as "catch-and-kill," involves paying for the exclusive rights to stories with the intention of never actually publishing them.

At his sentencing last year, Cohen said that "time and time again, I felt it was my duty to cover up [Trump's] dirty deeds."

Trump tweeted after the sentencing that he "never directed Michael Cohen to break the law. He was a lawyer and he is supposed to know the law. It is called 'advice of counsel,' and a lawyer has great liability if a mistake is made. That is why they get paid."