During a raucous rally in Montana on Thursday night, President Trump made a remarkable admission about the man he nominated earlier this year to lead the Department of Veterans Affairs: He might not have been qualified.

Trump went on a long riff about the failed nomination of Ronny L. Jackson, blaming its demise on Sen. Jon Tester, the Democratic senator running for reelection in Montana.

“Jon Tester led the Democrat mob in the effort to destroy the reputation of a great man, Admiral Ronny Jackson,” Trump told his crowd in Missoula.

Jackson, a long-serving White House physician, withdrew his nomination in April, less than 24 hours after Tester, the top Democrat on the House Committee on Veterans’ Affairs, authorized the release of allegations that Jackson had been drunk on the job, improperly prescribed medications and contributed to a toxic work environment.

Trump, speaking in a state that has one of the highest per capita rate of military veterans in the United States, lavished praise on Jackson and his work in the White House, calling him “a handsome, wonderful father” with a “beautiful family, incredible wife.”

The president then recounted his courting of Jackson, then a rear admiral in the Navy, to lead Veterans Affairs.

“I said, ‘Admiral, how would you like to head up the VA?’” Trump recalled. “’I want somebody great. You’re an admiral, you’re a leader.’ And he’s 50 years old. He never had a problem in his whole life. And he said, ‘Sir, I had never thought of it, but I’ll do whatever your wish is, sir.’ He didn’t really want it.”

“And he might not have been qualified,” Trump added. “But here’s a doctor at a high level, and he’s a man that everybody respected. I saw that. Respect is so important.”

Trump compared the allegations against Jackson with those that were more recently leveled against Supreme Court Justice Brett M. Kavanaugh, whose Senate confirmation process was roiled by women accusing him of decades-old sexual misconduct.

“Same thing. Same thing. Almost — almost — if this is believable — worse,” Trump said. “I’m here because I can never forget what Jon Tester did to a man that’s of the highest quality.”

Tester is facing Republican challenger Matt Rosendale in a state Trump carried by more than 20 percentage points over Democrat Hillary Clinton in 2016.