William P. Barr, President Trump's nominee to be attorney general, met informally with senators last week. (Jonathan Ernst/Reuters)

Two years of simmering tension between the White House, the Justice Department and Congress will culminate in Tuesday’s confirmation hearing of William P. Barr to be the next attorney general, where he is expected to resist Democrats’ demands for explicit promises about the fate of special counsel Robert S. Mueller III’s investigation into President Trump.

As the Trump administration enters its third year, Barr is poised to inherit a political powder keg in the Mueller probe, which seeks to determine if any Trump associates conspired with the Kremlin to interfere in the 2016 election, and whether the president tried to obstruct that investigation.

The fight over Mueller’s independence is the most visceral piece of the larger battle being waged between Democrats and Republicans over the independence of the Justice Department. Democrats accuse Trump of trying to bend the FBI to his will; Trump and his supporters charge the nation’s law enforcement agencies are conducting a “witch hunt” for political reasons.

Republicans have majority control of the Senate and the Judiciary Committee that will hold the hearing, which is scheduled to last two days, and so far there are no dis­cern­ible cracks among the GOP that would suggest Barr’s nomination is in any jeopardy. Three Democrats on the panel are viewed as potential 2020 presidential candidates, and the hearing could offer an early glimpse into those lawmakers’ lines of attack against the Trump administration.

In private conversations with committee members last week, Barr offered assurances he has no plans to interfere with Mueller’s work.

“My intention will be to get that on the record before I’m satisfied,” said Sen. Dianne Feinstein (Calif.), the committee’s top Democrat. “It’s very important that Mueller be able to have no interference whatsoever.”

At the hearing, Barr intends to publicly repeat his pledge not to interfere with or shut down Mueller’s work, but is determined not to make broader or more specific promises about how he will approach the Russia investigation or any ethics review of his involvement in it, according to people preparing him for the hearing.

“He will promise to do the right thing, and he will promise to protect the integrity of the Justice Department,” said one person familiar with Barr’s preparations, who, like others, spoke on the condition of anonymity to discuss candid insights.

Some Democrats have argued for Barr’s recusal from the Mueller probe because of his past public statements critical of some aspects of the investigation, and a private memo he sent to Deputy Attorney General Rod J. Rosenstein last June in which he called Mueller’s investigation into whether the president may have obstructed justice “fatally misconceived.” Barr also wrote that Mueller should not be allowed to subpoena the president about obstruction, saying an “interrogation” was not warranted.

One person close to Barr said he felt “very strongly” about the issue and wrote the memo hoping his advice might help officials who might be too busy to consider the issue thoroughly. Democrats have said his memo and past statements suggest a bias against the special counsel investigation.

Both Republicans and Democrats expect the memo will play a major role in the hearing.

Former Justice Department officials said it is unusual for a former attorney general — Barr served in the job during the George H.W. Bush administration in the early 1990s — to write a lengthy, unsolicited legal opinion to current Justice Department leadership.

People close to Barr said they do not expect him to renounce his sentiments. They instead stress that he did not have detailed internal information about Mueller’s work that he would likely receive if confirmed, and that information could change his view.

Barr also will likely have to answer for meetings he participated in around the time the memo was submitted on June 8. On May 30, Barr gave a presentation to Justice Department political appointees, though he did not mention the document, according to people who attended. Around that time, Barr also spoke to then-attorney general Jeff Sessions, according to several people familiar with the matter.

Sessions was recused from the Russia probe, and it’s unclear if the two discussed the arguments Barr made in his memo.

On June 27, Barr visited the Justice Department again to speak at a lunch organized by the Office of Legal Counsel, which he had once headed and to which he had directed the memo. People familiar with the discussion during that lunch described it as a professional development opportunity for the office’s attorneys, not an occasion for Barr to discuss his sentiments on Mueller.

Around the time Barr’s memo was submitted to the Justice Department, it was also sent to the White House, according to a person familiar with the matter. That could be a another troublesome point for Barr. Long before he submitted the memo, Barr had discussions about potentially serving as Trump’s lawyer in the investigation, though he declined. Barr’s allies say they do not believe that presents a conflict with his supervising the Mueller probe, though it is likely to generate questions at his confirmation hearing.

Barr spoke with friends about the memo before he sent it, but he did not coordinate with the White House, according to a person familiar with the discussions.

Democrats on the panel are preparing lengthy questions for Barr about the memo, and any related conversations, hoping to find out who in the administration spoke to Barr about it.

In a sign that even Republicans are aware of the potential problems for Barr surrounding the memo, Judiciary Committee Chairman Lindsey O. Graham (R-S.C.) has also asked for an explanation.

Graham said last week that he does not take issue with the memo’s contention that Mueller should not investigate whether Trump’s firing in May 2017 of then-FBI director James B. Comey was obstruction of justice.

“He’s got some concerns about turning the firing of a political appointee into an obstruction of justice case, and I share those concerns,” Graham said. “But that’s his opinion as a private citizen. As attorney general, his job is to receive Mr. Mueller’s report.”

According to a letter to Barr from Sen. Sheldon Whitehouse (D-R.I.), and reviewed by The Washington Post, the senator plans to question Barr about how his current situation may compare to the Watergate scandal, when then-attorney general Elliot L. Richardson resigned over a demand from the president to fire the special prosecutor in that case. At his confirmation hearing, Richardson had pledged not to interfere with the investigation.

The issue of recusals, normally dealt with as dry legal matters handled behind closed doors, has become incendiary in the Trump administration. The president never forgave Sessions for recusing from the Russia probe. When Trump named Sessions’s former chief of staff, Matthew G. Whitaker, to serve as acting attorney general in November, the move created renewed questions about recusals because Whitaker had publicly criticized Mueller in 2017 and suggested an acting attorney general could effectively stop Mueller by starving his office of funding.

At the time, Justice Department officials said Whitaker would follow the normal ethics process to deal with potential conflicts. Instead, Whitaker had a small group of senior advisers consult with Justice Department ethics officials, according to an official who spoke on the condition of anonymity. After those ethics officials said that, if asked, they would recommend Whitaker recuse from the Russia probe to avoid the appearance of conflict because of his past statements, his advisers told him he should not, and Whitaker did not recuse.

That sequence of events has intensified accusations from Democrats that the Trump administration is politicizing the Justice Department, which typically keeps its investigative work far removed from the White House.

Yet among Republicans hoping to see Barr confirmed quickly, there is a belief that Democratic anger about Whitaker — both his handling of the recusal and the court challenges to the legality of his appointment — will work in Barr’s favor.

“The best argument for confirming Barr is Whitaker,” said one Republican involved in the discussions.

Sen. Amy Klobuchar (D-Minn.) called Whitaker “a walking, talking conflict with all of his past activity” but emphasized that her desire to see the process keep moving “shouldn’t be equated with” support for Barr.

Klobuchar said that even if Barr can assuage her concerns about the specifics of his Mueller memo, “I’m still concerned about some of his views about executive power.”

When his nomination was first announced last month, Barr’s main selling point was his long résumé of top Justice Department jobs and his years of experience as a lawyer in and out of government.

Yet his record also poses potential vulnerabilities, particularly when it comes to the Mueller probe. In the early 1990s, Barr was an outspoken critic of the prosecutor handling the Iran-contra case and pushed for President Bush to pardon those who were charged.

Democrats plan to press Barr on whether he would take a similar view toward possible pardons of former Trump campaign chairman Paul Manafort or others who have been convicted as a result of Mueller’s investigation, according to a Senate aide.

While questions about Mueller and Barr’s memo are expected to dominate the hearing, Democrats also plan to press him on his record on the use of torture on terrorism suspects, abortion, and his past statements indicating support for renewed investigations of Trump’s opponent in the 2016 election, Hillary Clinton.