William Barr, President Donald Trump's attorney general nominee, said Tuesday that he does not believe the special counsel Robert Mueller "would be involved in a witch hunt" and that he and Mueller are good friends.

Barr's comments came during his highly anticipated confirmation hearing before the Senate Judiciary Committee.

Barr faced intense scrutiny from Democrats because of an unsolicited memo criticizing the Mueller investigation that he shared with the White House and the Justice Department last year.

Barr said he wrote the memo because he was concerned that the obstruction investigation "involved stretching the statute" at the center of the probe, which he believed could have far-reaching implications going forward.

William Barr, President Donald Trump's nominee for attorney general, said Tuesday that he is "good friends" with the special counsel Robert Mueller and that he believes Mueller to be a fair-minded person.

Barr's comments came during his highly anticipated confirmation hearing before the Senate Judiciary Committee.

"Do you trust [Mueller] to be fair to the president and the country as a whole?" South Carolina Sen. Lindsey Graham asked Barr.

"Yes," Barr replied.

Graham then asked Barr whether he believed Mueller was "involved in a witch hunt against anybody."

"I don't believe Mr. Mueller would be involved in a witch hunt," Barr said.

In prepared remarks released Monday, the former attorney general under President George H.W. Bush said, "On my watch, Bob will be allowed to complete his work."

Barr's statements come amid a firestorm surrounding an unsolicited memo he sent to the White House and Justice Department in June in which he called Mueller's obstruction of justice investigation "legally insupportable."

In his 20-page memo, Barr argued that Mueller's obstruction probe is based on an overly expansive reading of the special counsel's powers.

He also wrote that Mueller shouldn't be allowed to demand an interview with Trump about obstruction of justice.

"As I understand it, his theory is premised on a novel and legally insupportable reading of the law," Barr wrote. "Mueller should not be permitted to demand that the President submit to interrogation about alleged obstruction."

The investigation, Barr added, shouldn't be sanctioned by the Justice Department.

Barr walked back his comments in his prepared testimony, saying, "I believe it is in the best interest of everyone — the President, Congress, and, most importantly, the American people — that this matter be resolved by allowing the special counsel to complete his work."

He added: "The country needs a credible resolution of these issues. If confirmed, I will not permit partisan politics, personal interests, or any other improper consideration to interfere with this or any other investigation."

The memo took center stage during Barr's confirmation hearing this week. Addressing the controversy, Barr said he wrote the memo because he was concerned that the obstruction investigation "involved stretching the statute" at the center of the probe, which he believed could have far-reaching implications going forward.

In a letter Barr sent to Graham on the eve of his confirmation hearing, he said he shared the memo with both of Trump's lawyers, as well as lawyers representing Trump's son-in-law, Jared Kushner, who is also a subject of interest in the Russia investigation.