The Pentagon’s top officials on Wednesday defended the military’s tradition of staying out of elections, after a new book reported that Gen. Mark A. Milley, the chairman of the Joint Chiefs of Staff, feared former president Donald Trump would attempt a coup.

Milley repeatedly declined to confirm whether the comments attributed to him in the book “I Alone Can Fix It: Donald J. Trump’s Catastrophic Final Year,” are accurate, but said he and other senior officers upheld their constitutional obligations throughout the chaotic presidential transition.

“The military did not, and will not, and should not ever get involved in domestic politics,” Milley said, speaking at a Pentagon news conference. “We don’t arbitrate elections. That’s the job of the judiciary and the legislature and the American people. It is not the job of the U.S. military. We stayed out of politics. We’re an apolitical institution.”

In the book, Milley compares Trump’s frequent unfounded claims of widespread election fraud to behavior by Nazi leader Adolf Hitler, who insisted he was both a victim and savior.

“This is a Reichstag moment,” Milley told aides, according to the book by Washington Post reporters Philip Rucker and Carol D. Leonnig. “The gospel of the Führer.”

Another new book, “Frankly, We Did Win This Election: The Inside Story of How Trump Lost,” describes Milley and Trump clashing over whether to use the military to quash racial-justice protests across the country. Milley sought to stay close with Trump through the final months of his presidency out of concern that he might invoke the Insurrection Act and deploy active-duty troops on America’s streets, according to the book by Wall Street Journal reporter Michael Bender.

Milley declined to address those accounts Wednesday, but said that he and the military’s Joint Chiefs of Staff provided their best military advice to Trump, and have continued to do so with President Biden. They take an oath to the Constitution, not any individual, Milley said, repeating comments he has made before.

“Not one time did we violate that,” Milley said. “The entire time, from time of commissioning to today, I can say with certainty that every one of us maintained our oath of allegiance to that document, the Constitution, and everything that’s contained within it.”

Milley added that senior military leaders maintained “the tradition of civilian control of the military,” and “we did that without fail” while remaining apolitical.

“We did that then, we do that now, and we’ll do that forever,” Milley said.

Defense Secretary Lloyd Austin, the retired Army general whom Biden selected to run the Pentagon, defended Milley, saying he has full faith and confidence in him.

“I’m not guessing at his character,” Austin said, noting that they had served together in combat. “He doesn’t have a political bone in his body.”

Milley has come under attack by Trump, who issued a statement last week denying that he spoke to anyone about a coup.

“So ridiculous!” Trump’s statement said. “Sorry to inform you, but an Election is my form of ‘coup,’ and if I was going to do a coup, one of the last people I would want to do it with is General Mark Milley.”

Trump said he lost respect for Milley after the general “choked like a dog” by apologizing in June 2020 for appearing in his battle fatigues alongside Trump outside the White House moments after the area was forcibly cleared of protesters by federal forces.

Milley later acknowledged that he should not have been there, saying last year that his presence with the president “in that moment, and in that environment, created the perception of the military involved in domestic politics.”

More recently, Milley has been a lightning rod for conservative critics after admonishing lawmakers who questioned whether the military should teach critical race theory, a field of study examining systemic racism.

“I’ve read Mao Zedong. I’ve read Karl Marx. I’ve read Lenin. That doesn’t make me a communist,” Milley told the House Armed Services Committee last month. “So what is wrong with understanding … the country which we are here to defend?”

Republicans have pressed the Pentagon to stop teaching the theory in any form, even as part of academic work.

Austin, the nation’s first Black defense secretary, said Wednesday that he does not want the Defense Department to get “distracted” with the race theory conversation.

“This department will be diverse. It will be inclusive. And we’re going to look like the country that we support and defend,” Austin said. “And, our leadership will look like what’s in the ranks of our military. And so, I’m committed to that. This department is committed to that. The chairman’s committed to that.”