But the burger dinners have stopped. Interviews with more than a dozen White House, congressional and current and former Defense Department officials over the past six weeks paint a portrait of a president who has soured on his defense secretary, weary of unfavorable comparisons to Mr. Mattis as the adult in the room, and increasingly concerned that he is a Democrat at heart…

White House officials said Mr. Mattis had balked at a number of Mr. Trump’s requests. That included initially slow-walking the president’s order to ban transgender troops from the military and refusing a White House demand to stop family members from accompanying troops deploying to South Korea. The Pentagon worried that doing so could have been seen by North Korea as a precursor to war.

Over the last four months alone, the president and the defense chief have found themselves at odds over NATO policy, whether to resume large-scale military exercises with South Korea and, privately, whether Mr. Trump’s decision to withdraw the United States from the Iran nuclear deal has proved effective.