President Trump on Wednesday savaged the political legacy of the late Sen. John McCain, blaming the Arizona Republican for pushing the U.S. into "endless wars" and accusing him of giving an opposition research dossier to the FBI "to put me at jeopardy."

"I have to be honest, I've never liked him much," Trump said during a speech at an Ohio tank manufacturing plant, continuing what has become a multiday assault on McCain.

He also slammed McCain for his 2017 vote against repealing Obamacare, a topic that was the focus of a Trump tweet Tuesday.

Trump's recent attacks on McCain have divided Republicans and prompted Senate Minority Leader Chuck Schumer, D-N.Y., to resume a push to rename a Senate office building in McCain's honor.

"John McCain received a fake and phony dossier — did you hear about the dossier? It was paid for by crooked Hillary Clinton," Trump told the crowd on Wednesday. "And John McCain got it, he got it, and what did he do? He didn't call me. He turned it over to the FBI hoping to put me at jeopardy, and that's not the nicest thing to do. Because I'm a very loyal person."

McCain gave the dossier, which includes lurid and unproven sexual claims about Trump, to the FBI after receiving a copy from its author, former British spy Christopher Steele. At the time, Trump and McCain already had bad blood, after Trump infamously argued in 2015 that McCain was "not a war hero" because he was captured during the Vietnam War.

[Related: Isakson: Trump's attacks on John McCain 'drive me crazy']

Trump invoked McCain's support for military intervention abroad. Though critical of former President George W. Bush's management of the Iraq War, McCain voted for the war in 2002 and advocated a troop surge in 2007.

"We're in a war in the Middle East that McCain pushed so hard. He was calling Bush, President Bush all the time — 'get into the Middle East, get into the Middle East,'" Trump said. "And so now we are into that war $7 trillion, thousands and thousands of our people have been killed, millions of people overall. And frankly we are straightening it out now, but it has been a disaster for our country. We've spent tremendous wealth and tremendous lives in that war and what do we have? It's worse than it was 19 years ago. I call them the endless wars. John McCain loved it."

Trump added he wasn't given any credit for authorizing funeral procedures for McCain last year.

"I endorsed him [in 2008] at his request, and I gave him the kind of funeral that he wanted, which as president I had to approve. I don't care about this, I didn't get a thank you, that's OK," Trump said. "We sent him on the way. But I wasn't a fan of John McCain."