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.

Read More