As the Senate confirmation hearing got underway Tuesday for William Barr, President Donald Trump's nominee for attorney general, Democratic Sen. Dick Durbin asked Barr if he's prepared to be at odds with the president, for a "Mattis moment." It was a reference to former Secretary of Defense James Mattis' recent decision to resign over his disagreements with Trump.

Barr, who's 68, said while he might have been intimidated a few years ago, he wouldn't be this late in his career.

"I have a very good life, I love it -- but I also want to help in this circumstance and I am not going to do anything I think is wrong, and I will not be bullied into doing something that I think is wrong, by anybody" including Congress or the president, Barr said.

Testifying before the Senate Judiciary Committee, Barr is facing tough questions from Democrats over his views on special counsel Robert Mueller's investigation and a memo Barr wrote in June 2018 opposing an obstruction of justice case against the president.

Analyzing the president's firing of then-FBI director James Comey in May 2017, Barr argued in the memo to Deputy Attorney General Rod Rosenstein that any obstruction of justice inquiry into Trump based on the firing would be "fatally misconceived."

Barr knows the Justice Department from his time as attorney general under President George H. W. Bush. And while Democrats acknowledge his previous experience, many insist the current situation is unprecedented, and have been in lockstep demanding assurances from Barr that the Mueller report be made public and that he not interfere or limit the special counsel.

Senate Democratic Leader Chuck Schumer has gone so far as to call on Trump to rescind Barr's nomination based on the memo.

Barr addressed the memo controversy head-on Tuesday.

"I wrote the memo as a former Attorney General who has often weighed in on legal issues of public importance, and I distributed it broadly so that other lawyers would have the benefit of my views," Barr said in his opening statement.

"As I explained in a recent letter to Ranking Member Feinstein, my 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. The memo did not address -- or in any way question -- the Special Counsel's core investigation into Russian interference in the 2016 election," Barr continued. "Nor did it address other potential obstruction-of-justice theories or argue, as some have erroneously suggested, that a President can never obstruct justice. I wrote it myself, on my own initiative, without assistance, and based solely on public information."

Barr also sought to reassure Democrats he thinks Mueller should be allowed to finish his work, unhappy over Trump's appointment of Acting Attorney General Matt Whitaker whom they suspected was named to block Mueller's investigation.

"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. 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," Barr said.

"Second, I also believe it is very important that the public and Congress be informed of the results of the Special Counsel's work. For that reason, my goal will be to provide as much transparency as I can consistent with the law. I can assure you that, where judgments are to be made by me, I will make those judgments based solely on the law and will let no personal, political, or other improper interests influence my decision."

Asked under what circumstances he might fire Mueller, Barr replied, “Under the regulations, Bob Mueller could only be terminated for good cause. Frankly, it’s unimaginable to me that Bob would ever do anything that gave rise to good cause.”

And he said he had made no promises to the president-- or been asked to make any.

"President Trump has 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," Barr said. "As Attorney General, my allegiance will be to the rule of law, the Constitution, and the American people. That is how it should be. That is how it must be. And, if you confirm me, that is how it will be."

Barr said Mueller would never go on a "witch hunt" -- what the president has repeatedly called the special counsel's investigation.

However, some decisions that could impact the release of Mueller's findings, such as whether the White House will assert any type of executive privilege, would not rest with Barr.

Mueller and Barr worked together in the early 1990s when Barr was attorney general and Mueller was the head of the DOJ's Criminal Division.

Sen. Lindsey Graham, R-S.C., the Judiciary Committee's new chairman, said Mueller and Barr are "best friends" and have known each other for more than 20 years, adding that their wives have been in a Bible study group together and that Mueller has attended the weddings of two of Barr's daughters.

At Graham's request, former Sen. Orrin Hatch, a Utah Republican and long-serving member of the Judiciary Committee, introduced Barr Tuesday as he did for Barr's previous confirmation hearings.

Barr, meanwhile, outlined his friendship with Mueller.

"I have known Bob Mueller personally and professionally for 30 years. We worked closely together throughout my previous tenure at the Department of Justice under President Bush. We've been friends since. I have the utmost respect for Bob and his distinguished record of public service. When he was named special counsel, I said that his selection was 'good news' and that, knowing him, I had confidence he would handle the matter properly. I still have that confidence today," Barr said.

Barr also said his priorities at the Justice Department are fighting violent crime, prosecuting hate crimes, enforcing and improving immigration laws and protecting the right to vote.

He noted that he was partially retired, but took the job out of love for the Department of Justice and reverence for the law.

ABC News' Mike Levine contributed to this report.