Sen. Lindsey Graham (R-SC) on Wednesday called out critics of President Trump who are using his remarks about the late Sen. John McCain (R-AZ) to attack him.

“A lot of people are coming to John’s defense now that called him crazy and a war mongerer, so it’s kind of interesting to see the politics of how this dispute’s being used to bash Trump by people who are against both Trump and McCain,” he said, according to ABC News.

Trump has criticized McCain over the past several days, after reports surfaced that McCain had asked one of his aides to distribute the Democrat-funded and Fusion GPS-produced dossier that claimed collusion between the Trump campaign and Russia in the days after the 2016 election.

Trump critics have been calling on Republicans to speak out against Trump’s criticism of McCain, and particularly on Graham, a close friend of McCain.

Graham said during the interview that he did not like Trump’s comments on McCain, but that it would not stop him from working with the president.

Graham said:

I love John McCain. I traveled the world with him. I learned a lot from him. He’s an American hero and nothing will diminish that. I think the president’s comments about Senator McCain hurt him more than they hurt the legacy of Senator McCain. I’m going to try to continue to help the president. A lot of people are coming to John’s defense now that called him crazy and a war mongerer, so it’s kind of interesting to see the politics of how this dispute’s being used to bash Trump by people who are against both Trump and McCain. My job is to represent the people of South Carolina. They want me to work with the president where I can. I’ve gotten to know the president. We have a good working relationship. I like him. I don’t like it when he says things about my friend John McCain. And I think the best thing that can happen, I think for all of us, is to move forward and focus on the challenges.

Trump explained his attacks at an event at a U.S. Army tank plant in Lima, Ohio, on Wednesday, citing a litany of complaints that included the dossier and McCain’s “no” vote on repealing Obamacare.

“So now what we can say, now we’re all set — I don’t think I have to answer that question but the press keeps [asking], ‘What do you think of McCain, what do you think?’” Trump concluded. “Not my kind of guy, but some people like him and I think that’s great.”