Attorney general nominee William P. Barr said in written testimony released Monday that he would let special counsel Robert S. Mueller III finish his investigation of Donald Trump’s presidential campaign without political interference and that it was “very important” Congress and the public be informed of the results.

Barr said it would be his goal to “provide as much transparency as I can consistent with the law” about the results of the investigation, though he offered no specific commitments about what would become public or be turned over to Congress.

The four-page testimony, released a day ahead of Barr’s confirmation hearing before the Senate Judiciary Committee, offered a preview of how he will address what his advisers expect to be the most challenging lines of inquiry. Trump’s nominee to be the top U.S. law enforcement official has occasionally been critical of the special counsel investigation and wrote in a memo to Justice Department leaders last year that Mueller’s apparent theory of possible obstruction of justice by the president was “fatally misconceived.”

Because Republicans have majority control in the Senate, Barr is likely to be confirmed even if Democrats are not persuaded by his assurances on Mueller and unanimously oppose his nomination. Still, the hearing will allow for a public airing of two years of simmering tensions between the White House, the Justice Department and Congress over the future of the special counsel’s work and the broader independence of federal law enforcement.

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 his written testimony, Barr vowed to maintain the Justice Department’s independence and said that Trump — who has been publicly critical of the FBI and Justice Department — “sought no assurances, promises, or commitments from me of any kind, either express or implied, and I have not given him any, other than that I would run the Department with professionalism and integrity.”

Of the investigation into whether Trump’s campaign coordinated with Russia to influence the 2016 election, Barr said it was “vitally important that the Special Counsel be allowed to complete his investigation.” He said he had confidence that Mueller, whom he considers a friend, will handle the matter properly.

“If confirmed, I will not permit partisan politics, personal interests, or any other improper consideration to interfere with this or any other investigation,” Barr said. “I will follow the Special Counsel regulations scrupulously and in good faith, and on my watch, Bob will be allowed to complete his work.”

Though Barr, a former attorney general, deputy attorney general and head of the Justice Department’s Office of Legal Counsel, unquestionably has the experience to again lead the department, Democratic lawmakers have said they are troubled by what he has said previously about the special counsel and related Justice Department matters.

In 2017, for example, Barr said that he would have liked to have seen “more balance” on Mueller’s team — which includes many lawyers who have given political contributions to Democrats — and he wrote that Trump’s decision to fire James B. Comey as FBI director was “quite understandable.”

Barr, now a lawyer in private practice, wrote a lengthy memo to the Justice Department in June 2018 questioning Mueller’s authority to investigate whether the president had sought to obstruct justice — an examination that includes Comey’s firing. He said that Mueller “should not be permitted to demand that the President submit to interrogation about alleged obstruction.”

That assertion could be particularly important, because if Barr is confirmed before Mueller’s work is done, he would likely have to approve a bid by the special counsel to force the president to answer questions in the case.

So far, Trump has answered only a limited set of Mueller’s inquiries in writing.

Both Republicans and Democrats expect the memo will play a major role in Barr’s hearing, as Democrats press the nominee on why he sent it and who he talked with about it, and whether it means he should now recuse himself from the Mueller probe.

Barr said in his written testimony that his memo was “narrow in scope, explaining my thinking on a specific obstruction-of-justice theory under a single statute that I thought, based on media reports, the Special Counsel might be considering.” He disputed the idea that it advanced a theory that the president could never obstruct justice.

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 who spoke on the condition of anonymity to discuss a sensitive issue.

Sessions recused himself from the Russia probe, and it’s unclear whether 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 led 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 the Mueller probe.

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. Long before he submitted the memo, Barr had discussions about potentially serving as Trump’s lawyer in the investigation, though he declined.

In his written testimony, Barr said of the memo: “I wrote it myself, on my own initiative, without assistance, and based solely on public information.”

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

Barr also laid out in his written testimony what he would consider key priorities of the Justice Department if he were confirmed. He said his department would focus on violent crime and said he was particularly concerned that “violence is also rearing its head in the political realm.”

Barr said that he would continue the Justice Department’s focus on enforcing immigration laws and that he would devote resources to “protecting the integrity of elections.”

“I will build on the work already done by Special Counsel Mueller and current Department of Justice leadership and ensure that the full might of our resources are brought to bear against foreign persons who unlawfully interfere in our elections,” Barr said. “I believe that our country must respond to any foreign interference with the strongest measures, and we must work with partners at the state level to ensure that our election infrastructure is completely protected.”

The hearing is scheduled to begin at 9:30 a.m. on Tuesday.

Karoun Demirjian and Tom Hamburger contributed to this report.