President Trump’s Pentagon chief is in the doghouse.

Trump is thinking about giving Defense Secretary James “Mad Dog” Mattis the boot after the November midterm elections, according to a published report.

The president worries Mattis is a Democrat “at heart,” according to the New York Times. Trump has even started to call the former Marine general “Moderate Dog” instead of “Mad Dog,” a nickname Mattis never liked in the first place, according to other reports.

Trump is frustrated that the defense secretary is described as the adult in the room, White House aides and other officials told the Times, and wants someone running the department who is more of a vocal supporter, like Secretary of State Mike Pompeo.

Bob Woodward’s new book, “Fear: Trump in the White House,” quotes Mattis comparing Trump to an elementary school student.

During a nuclear standoff with North Korea last January, the defense secretary told colleagues that the president was acting like a “fifth- or sixth-grader,” according to the book.

Mattis denied Woodward’s reporting, and also said he isn’t behind a recent anonymous op-ed in the New York Times by a senior administration official criticizing the president.

On top of that, Trump and Mattis are at odds on policy. They’ve reportedly clashed over NATO strategy, military exercises in South Korea, banning transgender people from serving in the military and the effectiveness of Trump’s move to withdraw the United States from the Iran nuclear deal.

Mattis also reportedly rebuked a demand to stop family from going with troops deployed to South Korea, and a White House attempt to more closely supervised military operations, the Times reported.

Trump praised Mattis earlier this month.

“He’ll stay right there, we’re very happy with him, we’re having victories people don’t even know about,” Trump said, thanking Mattis for refuting comments attributed to him in Woodward’s book. “I think he’s a terrific person, he’s doing a fantastic job as secretary of defense.”