WASHINGTON — Pete Buttigieg accused President Donald Trump on Thursday of exploiting his privileged upbringing to "fake a disability" during the Vietnam War so that "somebody could go to war in his place."

Buttigieg, who served in Afghanistan as a Navy intelligence officer, sought to use his own military background to draw a sharp contrast with Trump during a "Washington Post Live" interview. Pressed on whether he believed that Trump, who cited bone spurs in his heel to be exempted from the draft, had a disability, Buttigieg suggested he did not — "at least not that one."

"If you're a conscientious objector, I'd admire that," said Buttigieg, the South Bend, Indiana, mayor and Democratic 2020 contender. "But this is somebody who, I think it's fairly obvious to most of us, took advantage of the fact that he was the child of a multimillionaire in order to pretend to be disabled so that somebody could go to war in his place."

Allegations that Trump dodged the draft have been a sore spot for the president dating back to his 2016 campaign, when it was revealed that he had received five deferments from service in the Vietnam War — four for education and one for a diagnosis of bone spurs.

Trump's former attorney, Michael Cohen, told the House Oversight Committee in February that Trump had told him "there was no surgery" and "You think I’m stupid? I wasn't going to Vietnam."

Buttigieg also lambasted the president for reportedly considering pardons for several U.S. service members or contractors convicted or accused of war crimes, calling it "disgusting."

"If you are convicted by a jury of your military peers of committing a war crime, the idea that the president is going to overrule that is an affront to the idea of good order and discipline and to the idea of the rule of law, the very thing we believe we're putting our lives on the line to defend," Buttigieg said.

There was no immediate comment from the White House.

But Buttigieg in recent days has increasingly attracted Trump's attention as he's gained traction in the Democratic presidential primary. Trump earlier this month mocked Buttigieg as Alfred E. Neuman, the goofy cartoon mascot of Mad Magazine, and criticized Fox News for hosting Buttigieg on Sunday for a town hall event.

As Buttigieg works to increase his appeal to black voters, he blasted Trump on Thursday for what he described as "the racism that is emanating from this White House." Asked whether Trump is a racist, Buttigieg said, "I think so."

"If you do racist things and say racist things, the question of whether that makes you a racist is almost academic," Buttigieg said. "The problem with the president is that he does and says racist things and gives cover to other racists."