Washington (CNN) President Donald Trump's attorney general nominee, William Barr, repeatedly sought to reassure senators Tuesday that he would not interfere with special counsel Robert Mueller's investigation, claiming he wouldn't be "bullied" into doing anything he deemed improper.

"I am not going to do anything that I think is wrong, and I will not be bullied into doing anything I think is wrong," Barr told the Senate Judiciary Committee. "By anybody. Whether it be editorial boards, or Congress or the President. I'm going to do what I think is right."

For more than eight hours, Barr, 68, appeared at ease, rarely wavering from a measured tone despite facing extraordinary questions into how he would handle the probe that could imperil the presidency. Under a Republican-controlled Senate, and needing only a simple majority vote, Barr seems all but certain to be confirmed to the same post he held under President George H.W. Bush.

Many of the senators' questions regarded the Mueller probe, which Barr would oversee as attorney general. Barr pledged to release "as much as I can" of Mueller's findings to the public, to provide Mueller with the resources and time to finish the job, to not terminate Mueller without good cause and to notify Congress if he denied a major request during the investigation. He said he would resign "if someone tried to stop a bonafide, lawful investigation to try to cover up wrongdoing."

Barr said Trump did not seek "assurances, promises or commitments from me of any kind" and that he did not give any, "other than that I would run the department with professionalism and integrity."

Yet he sympathized the President, saying it's "understandable" someone would view an investigation as a "witch hunt" -- Trump's preferred moniker for the special counsel probe -- if they felt they were wrongly accused. But Barr also asserted that Mueller wouldn't be involve in a "witch hunt," defending the special counsel's integrity.

Democratic senators expressed concern with Barr's record on a variety of issues, including Mueller, but did not rattle him. After hours of testimony, a tweet from the Senate Democrats' official account -- "Carefully choreographed statements that sound good won't suffice" -- both criticized Barr while underscoring that Democrats had not yet found a flaw that would sink his nomination.

The hearing also did not have the public protests or interruptions from the last high-profile Judiciary hearing, the confirmation hearings of Brett Kavanaugh for the Supreme Court, or Jeff Sessions' hearing to be Trump's first attorney general.

Asked why there weren't protesters, Judiciary Chairman Lindsey Graham quipped, "I don't I know, I didn't pay 'em not to come."

Presidential authority

Barr has publicly supported Trump's decision to fire former FBI Director James Comey over his handling of the investigation into former Secretary of State Hillary Clinton's email server. And he has privately criticized Mueller's inquiry into Trump's potential obstruction of justice in asking Comey to drop a probe into former national security adviser Michael Flynn -- and then firing him.

Democratic Sen. Dianne Feinstein zeroed in on a memo Barr sent last year to Deputy Attorney General Rod Rosenstein, in which he called the obstruction of justice aspect of the Mueller investigation "fatally misconceived" and said, "Mueller should not be permitted to demand that the President submit to interrogation about alleged obstruction."

Feinstein said the memo "shows a large sweeping view of presidential authority and a determined effort, I thought, to undermine Bob Mueller.

"When asked if he would block a potential Mueller subpoena requesting to ask the president questions about obstruction, Barr said he needed to know what the facts are.

"If there was a factual basis for doing it, and I couldn't say that it violated established policies, then I wouldn't interfere," he said.

Barr also rejected the view that the memo was meant as a job application, calling it "ludicrous.

"If I wanted the job, and was going after the job, there are many more direct ways of me bringing myself to the President's attention, than writing an 18-page legal memorandum," he said.

Barr also gave more details about how he delivered the memo, explaining that he first "verbally" gave his opinion to Rosenstein, recalling the deputy attorney general's "sphinxlike" reaction and his follow-up in a written memo. Barr said he asked Rosenstein's staff if he would prefer reading a one-page document or something in-depth.

Graham then interjected a bit of levity in the hearing, asking Barr if he thought Trump was a "one-pager kind of guy."

"I suspect he is," replied Barr.

Meeting with Trump in 2017

Before Barr was considered for the attorney general position, the White House considered him to join the President's legal defense team.

In June 2017, Barr testified, David M. Friedman, the US ambassador to Israel, asked him if he would be interested. Barr said he declined the offer, but accepted Friedman's invitation to meet the President the next day.

When Trump asked Barr about his personal friendship with Mueller and about the special counsel's integrity, Barr recalled telling the President that Mueller should be treated as a "straight shooter." Barr then said he told Trump that he was unable to take the job due to personal and professional obligations, they exchanged phone numbers, and he didn't hear from him again until the attorney general post came up.

Russia is a 'potent rival of our country'

Barr called Russia a "potent rival of our country" and said he had no reason to doubt that Russians had attempted to interfere in the 2016 US election.

"We have to get to the bottom of it," he said.

Barr went on, however, to note concern that "the fixation on Russia" could "obscure the danger from China."

"The primary rival of the United States is China," said Barr. "I think Russia is half the size it was when we were facing them at the peak of the Cold War. Their economy's long-term prognosis is nowhere near China's."

Comey and Clinton investigation

Barr criticized Comey's handling of the investigation into Clinton's email server, particularly for straying from Justice Department procedures in publicly announcing that Clinton's handling of classified information was "extremely careless" but not criminal.

"If you're not going to indict someone, then you don't stand up there and unload negative information about the person," said Barr. "That's not the way the Department of Justice does business."

Barr added that Comey had "no choice but to correct the record" when the former FBI director had to publicly announce just days before the presidential election that he had reopened, and then closed again, the investigation. "The whole sequence was very herky jerky and bizarre," he said.

"It sort of shows you what happens when you start disregarding the normal procedures and established practice," he added. "You sort of dig yourself a deeper and deeper hole."

'We need money right now for border security'

If confirmed, Barr would take over from acting Attorney General Matthew Whitaker, who replaced Trump's first attorney general, Jeff Sessions, who was fired by the President in November.

The Justice Department, Barr said, must concentrate on "zero tolerance" for violent hate crimes, "enforcing and improving" immigration laws and protecting the right to vote.

In a nod to criminal justice advocates concerned about his record, Barr recognized that the crime rate has "substantially fallen" since he left the department in the early '90s and said he would "diligently implement" the First Step Act, a bill overwhelmingly passed by Congress last year to overhaul prison laws. Yet he put himself in the same category as his tough-on-crime predecessor, saying, "Like Attorney General Sessions, I believe we must keep up the pressure on chronic, violent criminals."

Barr later added that while "there is racism still" in the criminal justice system, "overall" he thought "it's not predicated on racism."

The nominee said he regrets that he is testifying during a partial government shutdown, the longest in US history. For more than three weeks, Trump has pressed Congress to approve over $5 billion to build a wall on the US-Mexico border, one of his top campaign promises in 2016.

Barr said his thoughts are with the federal workers, and he echoed the administration's stance on immigration.

"We need money right now for border security, including barriers and walls and slats and other things -- anything that makes sense in different areas of the border," he said.

"I would like to see a deal reached whereby Congress recognizes that it's imperative to have border security, and that part of that border security, as a commonsense matter, means barriers," Barr added.