WASHINGTON — President Donald Trump hit the late Sen. John McCain with a fresh attack Wednesday, hammering the former prisoner of war as weak on veterans issues — and griping about the Arizona Republican's funeral — during a speech at an Army tank plant in Lima, Ohio.

"McCain didn’t get the job done for our great vets at the VA and they knew it," Trump said, arguing that's why he won support from military veterans during the 2016 election after calling into question the longtime senator's service record.

Trump's broadsides over veterans issues — which treated McCain like a campaign-trail rival, rather than a deceased former leader of his own party — were part of an extended tirade against the former Arizona senator at the tank plant, and an even more expansive four-day rant.

Trump, who reluctantly ordered the White House flags to half staff under pressure from veterans groups when McCain died, credited himself Wednesday with honoring his intra-party political rival.

"I gave him the funeral that he wanted, which as president I had to approve," Trump said. "I don't care about this: I didn't get a thank you. That's okay. We sent him on the way, but I wasn't a fan of John McCain."

Two Democratic veterans with presidential aspirations ripped Trump in response.

Massachusetts Rep. Seth Moulton, D-Mass., who is considering a run, called McCain an "American hero" and noted that Trump avoided the war McCain served in with a series of medical deferments.

"I’ve never met a veteran who doesn’t respect the hell out of John McCain," Moulton said in a statement to NBC News. "In fact everyone I know, even those who disagreed with McCain politically, believe he’s an American hero. So I’m not sure why the late senator has gotten under the president’s skin yet again, but maybe his bone spurs are flaring up.”

And South Bend Mayor Pete Buttigieg, who has launched an exploratory committee for a presidential bid, accused Trump of falsifying his physical limitations.

"When a president (who faked a disability in order to avoid serving) attacks a departed war hero, it's for attention," Buttigieg tweeted. "We should honor the late Senator McCain, and also follow his example by focusing not on the behavior of the president but on the future of our country."

Trump told the audience in Lima that he would save the press time by unfolding his grievances against McCain from the podium.

In addition to veterans issues, he said, he repeated prior attacks on McCain for voting against a repeal of Obamacare, which he said ended up "badly hurting the Republican Party, badly hurting our nation and hurting many sick people who desperately wanted good affordable healthcare."

And, he said, McCain was on the wrong side of the Iraq War, which Trump lamented had cost the U.S. "tremendous wealth" and "tremendous lives."

Rep. Eric Swalwell, D-Calif., who is considering a bid for the presidency, said on Twitter that he "would have walked out" on Trump if he'd been in attendance at the Lima event when the latest McCain-related remarks were made: "He's bad for America."

The attacks, which started over the weekend on Twitter, have continued through the early part of the week, even as McCain's friends and family have cried foul publicly.

Sen. Johnny Isakson, R-Ga., in a radio interview on Wednesday with Georgia Public Broadcasting, denounced Trump's earlier remarks as "deplorable" — the term Hillary Clinton famously used to describe half of Trump's supporters during the 2016 campaign.

His latest remarks came just hours after the late senator's daughter Meghan McCain pushed back again on the president's recent criticism of her father, calling it a "bizarre new low."

“I think if I had told my dad, 'Seven months after you’re dead you're going to be dominating the news and all over Twitter,' he would think it's hilarious that our president was so jealous of him that he was dominating the news cycle in death as well," McCain said on ABC's “The View.”

Trump also took shots at 1988 Democratic presidential nominee Michael Dukakis, 2020 Democratic presidential candidate Sen. Elizabeth Warren, D-Mass., and Clinton.

More than 30 years ago, Republicans ridiculed Dukakis in a 30-second ad featuring real footage of him riding in a tank as a list of weapons systems and military operations he'd opposed scrolled across the screen.

Trump said Wednesday that he was reminded of that ad, which helped then-Vice President George H.W. Bush win the presidency, because he was in a tank factory.

"I remember he tanked when he got into the tank," Trump said. "He tanked. I never saw anybody tank like that."

Then Trump mused about how he would look in a similar vehicle.

"So I said maybe I'll.., but I'm a little bigger than him," Trump said. "I think I'd look okay. How would I look in a tank? okay? ... The helmet was bigger than he was. That was not good."