Washington CNN  — 

President Donald Trump was startled Tuesday as he watched television coverage of his nominee for attorney general describing a warm relationship with the special counsel Robert Mueller in front of the Senate Judiciary Committee, according to three people familiar with the matter.

During the first day of his confirmation hearing, William Barr described telling the President the first time he met him in June 2017 that he was friends with Mueller, referring to him on a first name basis.

“I told him how well I knew Bob Mueller and that the Barrs and Muellers were good friends and would be good friends when this was all over,” Barr said. “Bob is a straight-shooter and should be dealt with as such.”

While Barr said during his hearing that Trump “was interested” in hearing about the friendship, the details that emerged this week caught the President off guard, the three sources said. He bristled at Barr’s description of the close relationship, complaining to aides he didn’t realize how much their work overlapped or that they were so close.

There is no indication Trump’s surprise will jeopardize the nomination, however.

Later, Trump privately rationalized the relationship between Barr and Mueller as stemming from both having worked in the Washington legal establishment for years, according to one of the people.

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

On Tuesday, Barr repeatedly sought to reassure senators that he would not interfere with 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 panel. “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.”

CNN’s Alex Rogers contributed to this report.