(CNN) –– Sen. Lindsey Graham said Wednesday that President Donald Trump called him after he delivered an emotional farewell to Sen. John McCain on the Senate floor, telling the South Carolina Republican he “did right by his friend.”

“He called yesterday after my speech and he couldn’t have been nicer. He said, ‘That was very sad. I just want to let you know you did right by your friend.’ I said, Thank you Mr. President.'” Graham told CNN’s Dana Bash in an interview on “Inside Politics” Wednesday, adding that the call from the President was “right out of the blue.”

Never one to mince words, Graham admitted when Trump “says something about John, it pisses me off.”

“I regret the relationship between the two,” Graham said when asked how to square his relationship with McCain and Trump, who famously feuded. “John is my dearest friend in the world and I’m going to try and help President Trump.”

He added, “To those who want me to say the only way you can honor John McCain is to fight Donald Trump and try to kick him out of office, I don’t agree. I’m going to do what I think is best for the country using what John taught me about the country.”

Besides his tribute speech on the Senate floor, Graham will read scripture at McCain’s memorial service at the National Cathedral in Washington, DC, on Saturday, and give a tribute in Annapolis, Maryland, at the Naval Academy service on Sunday.

(The-CNN-Wire™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.)