Still, these policies have the virtue of familiarity. The next few months offer the prospect of something frighteningly new. President Trump’s impromptu decision in early March to hold face-to-face talks with Kim Jong-un sets up a host of risks and an almost-impossible timeline. If the talks fail, lower-level diplomatic channels — usually held as a precursor to a leadership summit — could also collapse, raising the chances of war. The talks are now expected to take place by the end of May, the same month in which Trump has promised to abandon the Iran nuclear agreement if a deal is not reached to strengthen it. All this is happening with the State Department still desperately understaffed and in the midst of a transition. Trump, his aides say, is feeling newly liberated to ignore cautious advice, and his nominee for secretary of state, Mike Pompeo, is said to be fully in tune with his rowdier impulses. And on March 22, Trump announced that he was replacing McMaster with John Bolton, the hawkish lawyer who published an op-ed in The Wall Street Journal in February on “the legal case for striking North Korea first.” If events spin out of control, Mattis could be forced to choose between his loyalty to the chain of command and the moral imperative to avert a catastrophic war.

“This gets to a fundamental question,” I was told by a retired senior officer who knows him well. “Can Mattis win the president over in the most important debate we’ve had in decades, maybe centuries? I believe there is a moral hazard with this president, he will take everybody to the cliff. ... If Mattis is able to prevail, that is what God put him on earth to do. It’s that serious.”

When Trump invited Mattis onstage before a cheering, flag-waving throng in North Carolina in December 2016, he didn’t even give his first name. “Your next secretary of defense, General Mad Dog Mattis,” he bellowed. Later, as Mattis left the stage, voices could be heard chanting “Mad Dog” at the retired general. (It would be some time before Mattis, always polite, made clear that he couldn’t stand the nickname.) At the time, Trump had already picked Michael Flynn as national security adviser and was considering David Petraeus for secretary of state; John Kelly and McMaster would come later. The men chosen would go on to staff their bureaucracies with lower-level officers, many of them veterans of the Iraq war, giving the Trump administration a more military cast than any in recent United States history. The president-elect seemed to relish the prospect of packing his White House with warriors who would help return a Pattonesque brashness to America’s government and foreign policy.

Trump’s lifelong reverence for military men is partly about masculine affinity, the love of a self-styled warrior for the real thing. He spent his adolescent years at a military-themed boarding school, where he became infatuated with martial dress and ceremony and idolized his supervisor, a former Army colonel known to the boys as Maje. In black-and-white school photos from the early ’60s, Trump can be seen in boots, sash and a plumed shako, like some Austro-Hungarian infantryman. In “Never Enough,” his 2015 biography of Trump, Michael d’Antonio describes one of the future president’s proudest moments: cutting past a group of Catholic schoolgirls so that he and his classmates could strut in uniform in the front row of the Columbus Day parade. Although he never learned anything about real combat, Trump somehow emerged from the New York Military Academy in 1964 with the idea that his high school salutes and marches gave him “more training militarily than a lot of guys that go into the military.”

But some of Trump’s old friends and associates speculate that he is drawn to Mattis and the other military men partly for the opposite reason: They represent the austere virtues he knows he lacks. “With the generals, the demeanor, discipline, self-sacrifice, the strict adherence to a code is something he doesn’t see around him” in the business world, I was told by an executive who has known Trump for years. “The thing he probably has least personal experience of is that.” In other words, men like Mattis are, in many ways, as different from Trump as it is possible to be. Think of the gaudy ubiquity of Trump’s golden logo and consider this: When the Marine Corps was publishing its official history of the 2003 invasion of Iraq, Mattis insisted on removing every instance of his own name and replacing it with “Commander, First Marine Division.”

Even the backgrounds of these taciturn men form a stark contrast with Trump’s own story of inherited privilege and tabloid roguery. Mattis grew up in a house full of books and no TV set. His father was a former merchant marine who moved the family to Richland, Wash., a town mostly built by the federal government for workers at the Hanford nuclear site. His mother had worked for Army intelligence as a cipher clerk in South Africa during World War II. Mattis would later say that he was “kind of brought up more to do the job than attract attention to myself.” At school, he was skinny and shy but athletic; classmates remember him sticking up for less popular kids. After graduating from what is now Central Washington University, he joined the Marines in 1972, following an older brother and bucking the culture’s Vietnam-era disaffection from all things military. He was singled out early as a leader and took to the job with a selfless zeal that did not allow for marriage or children (an engagement early in his career was broken off). In an officer corps where marriage is the norm, he soon acquired another nickname: the Warrior Monk. His vast popularity within the military derives largely from his reputation for total, self-punishing commitment to his troops. One incident that has become canonical in the Mattis legend took place in Afghanistan in December 2001. A young Marine captain named Nathaniel Fick had ordered his troops into two-man teams to guard each position, telling the others to rest. It was about 3 a.m. and bitterly cold when Fick walked the line and saw three heads in one of the foxholes instead of two. He was about to chew the third man out for disobeying orders when he realized it was General Mattis, making the rounds. “He could have been in bed, no one would have blamed him, but he was out there doing the same thing I was doing,” Fick told me.