In a series of legal maneuvers that have defied Congress, drawn rebukes from federal judges and tested the country’s foundational system of checks and balances, President Trump has made an expansive declaration of presidential immunity that would essentially place him beyond the reach of the law.

In courts and before Congress, Trump’s legal teams are simultaneously arguing two contradictory points: that the president can’t be investigated or indicted by prosecutors because Congress has the sole responsibility for holding presidents accountable, and that the House’s impeachment inquiry is an unconstitutional effort that the White House can ignore.

“We have a president who simply doesn’t believe that Congress is a coequal branch of government,” said Elliot Williams, who helped run the Justice Department’s legislative affairs office during the Obama administration. “That’s a huge departure from anything we’ve seen in our lifetimes.”

The broad legal effort escalated on Tuesday when the White House counsel sent a letter to House Democratic leaders dismissing Congress’s impeachment inquiry as “illegitimate” and stating that the entire executive branch would refuse to cooperate with it.

For a president who has responded to investigations into his conduct with claims of “witch hunt!” and “presidential harassment,” the latest machinations underscore how Trump’s White House and private legal teams, as well as — to a lesser degree — the Justice Department, have come to agree with his absolutist view of executive power.

“The Constitution has a supremacy clause for a reason,” said Jay Sekulow, Trump’s private lawyer. “It has separation of powers for a reason. And it defines the president in a unique constitutional capacity — and that is as commander in chief and as chief executive. And it requires a unique set of both obligations and constitutional privileges.”

In his eight-page letter to Congress on Tuesday, White House counsel Pat A. Cipollone declared that “the President has a country to lead” and claimed that Congress’s attempts at oversight were overly partisan, lacked due ­process and ran afoul of constitutional principles. Echoing Trump, Cipollone made several political points in his letter, accusing Democrats of trying to overturn the results of the 2016 election.

Citing executive privilege, the Trump administration has blocked several officials from testifying before Congress or handing over documents in recent months. In a dramatic move Tuesday, the White House blocked House investigators from deposing Gordon Sondland, the U.S. ambassador to the European Union, just hours before he was set to testify as part of Democrats’ impeachment inquiry into whether Trump abused his office by pushing Ukraine to investigate a political rival.

Trump’s private lawyers are also defending him in multiple court cases by pointing to executive privilege, making the case that Trump’s position affords him special protections.

The White House has argued that Trump can refuse to cooperate with Congress’s impeachment inquiry because the House has not held a full vote authorizing the probe and that the Trump administration has not been given due process.

The White House would not commit to cooperating with Congress even if the House holds a full vote to open an impeachment inquiry, according to a senior administration official, who spoke on the condition of anonymity to discuss internal strategy.

Responding to the White House letter Tuesday, House Speaker Nancy Pelosi (D-Calif.) said the House would proceed with its investigation and consider any efforts to impede it as obstruction.

“Mr. President, you are not above the law,” she said in a statement. “You will be held accountable.”

Several legal scholars panned Cipollone’s letter as a political document with little legal relevance.

Michael J. Gerhardt, a University of North Carolina law professor, said the White House letter amounted to “a bunch of political talking points” with a “completely backwards” interpretation of the Constitution.

The Constitution gives the House the “sole power of impeachment” and does not prescribe how the process should unfold, said Gerhardt, author of “Impeachment: What Everyone Needs to Know.”

“The president doesn’t get to dictate to the House how it should do its job,” he said. “This is an attempt to flout the law and place the president above the law.”

Ilya Somin, a professor at Antonin Scalia Law School at George Mason University, joked in a Facebook post that the Trump administration’s legal reasoning made him wonder “whether the White House counsel was sick the day they taught law at law school.”

Somin also rejected the assertion from the White House that the inquiry violates “constitutionally mandated due process.” An impeachment inquiry, he said in an interview, is not a criminal trial.

“What’s at stake is losing a position of power,” Somin said. “None of the rights the White House demands” are required by the Constitution.

But Trump has long held an expansive view of executive power and has cited Article II of the Constitution, which defines the powers of the executive branch, as a catchall that gives him wide latitude.

“Article II allows me to do whatever I want,” Trump said in a June interview with ABC News.

The Justice Department has previously taken the position that sitting presidents cannot be criminally charged, a position that former special counsel Robert S. Mueller III said limited his options as he probed Trump’s conduct during a lengthy investigation.

While Trump’s original team of private lawyers encouraged him to cooperate with the investigation and many of his aides met with Mueller’s team, Trump never sat for an interview, and the results of the investigation seem to have emboldened him to take a hard-line approach to any investigations or court cases.

Trump’s private lawyers have taken an expansive view of presidential immunity in a series of lawsuits seeking to fend off subpoenas for his tax returns and financial records from congressional committees and state officials.

Earlier this year, Trump’s private attorneys argued in court that the president is immune from criminal investigation — not just by federal prosecutors, but also local prosecutors. In two other cases seeking to block congressional investigations into his finances, Trump’s lawyers have argued that Congress should not investigate the president’s conduct, claiming that it is a job for prosecutors.

Judges in all three cases have rejected the president’s sweeping arguments as out of step with history and the Constitution. Trump’s appeals of those rulings, which could eventually land at the Supreme Court, are still pending.

A federal judge in New York this week called Trump’s claims of immunity “repugnant to the nation’s governmental structure and constitutional values.” The judge denied the president’s request to block the Manhattan district attorney from accessing Trump’s tax returns. “The Court cannot square a vision of presidential immunity that would place the President above the law with the text of the Constitution, the historical record, the relevant case law” or any other authority, wrote U.S. District Judge Victor Marrero.

In an earlier ruling in Washington, issued before the start of the House impeachment inquiry, U.S. District Judge Amit Mehta refused to stop a House subpoena for Trump’s accounting firm records.

“It is simply not fathomable,” the judge wrote, “that a Constitution that grants Congress the power to remove a President for reasons including criminal behavior would deny Congress the power to investigate him for unlawful conduct — past or present — even without formally opening an impeachment inquiry.”

“Wow,” Chief U.S. District Judge Beryl A. Howell said in her courtroom Tuesday after a Justice Department lawyer argued that court rulings in 1974 allowing Congress to review materials from the Watergate grand jury should be viewed as invalid today.

The Justice Department said that the court should deny a House Judiciary Committee request for grand jury materials from Mueller’s investigation, despite the legal precedent set during the impeachment inquiry into President Richard M. Nixon.

“As I said, the department is taking extraordinary positions in this case,” Howell said.

But Trump’s legal teams have pressed ahead on multiple fronts, seeking to withhold from Congress and local prosecutors the president’s tax returns, financial records and officials whose testimony could embarrass the administration.

By defying the impeachment inquiry, Trump has essentially set off a constitutional power struggle between the legislative and executive branches.

The courts may ultimately have to decide, said Paul McNulty, who was chief counsel and communications director for Republicans on the House Judiciary Committee during the 1998 impeachment of President Bill Clinton.

“When it comes to checks and balances and the powers of the two branches, it’s like a game of rock, paper, scissors — everything seems to have another thing that could check it,” said McNulty, now the president of Grove City College in Pennsylvania.

Williams said Trump’s arguments amount to a claim of legal immunity that defies the intent of the Constitution and its authors.

“It cannot be the case that getting elected president is an automatic shield from any scrutiny, for even personal misconduct, be it criminal or civil,” he said. “If that were truly the case, then he really could go out and shoot someone on Fifth Avenue and not face any consequences.”