Secretary of Defense James Mattis didn’t just resign on Thursday; he resigned in protest over the president’s policies—the first time a Cabinet secretary has done that since Cyrus Vance quit his job as secretary of state, 40 years ago, over Jimmy Carter’s failed rescue attempt of the U.S. hostages in Iran.

President Trump tried to disguise this fact, tweeting late on Thursday that Mattis “will be retiring, with distinction, at the end of February.” But administration officials don’t “retire.” They “resign,” and Mattis—who already did retire as a four-star general from the Marine Corps in 2013—is resigning with bitterness and fatigue.

Mattis made this clear in his letter of resignation. Among its key lines: “One core belief I have always held is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships.” Trump is outspokenly disdainful of those alliances. Mattis went on, rubbing the point in harder: “We cannot protect our interests … without maintaining strong alliances or showing respect to those allies.” One can almost picture Trump’s face turning red upon reading that sentence. Mattis then pointed with particular pride to NATO—Trump’s least favorite alliance—touting its members’ “commitment to fighting alongside us following the 9-11 attack on America.” America First, indeed.

After a few more sentences about the importance of allies, Mattis laid down the real reason for his resignation in no uncertain terms: “Because you have the right to have a Secretary of Defense whose views are better aligned with yours on these and other subjects, I believe it is right for me to step down from my position.”

He added that he will leave Feb. 28, enough time for Trump to nominate a replacement and for Mattis himself “to make sure the Department’s interests”—note, the Department’s interests, not Trump’s—“are properly articulated at upcoming events,” including the congressional hearings over the fiscal year 2020 defense budget that he has just completed, and (just to poke it in Trump’s eye on last time) “the NATO Defense Managerial meeting.”

Some have speculated that Mattis timed his resignation over Trump’s withdrawal of troops from Syria, and there may be something to this, but rumblings have been heard for months now, from those who know him, that he would exit sometime soon after the midterm elections.

Trump hired Mattis, in the first place, under the misconception that, because his nickname in the Marines had been “Mad Dog,” he would be getting a savage killer keen on torture. At a postelection rally where he announced some of his Cabinet picks, Trump bragged, “We’re going to put in the greatest killers of all time.” In fact, Mattis hated the nickname, which few if any colleagues actually used. He once famously did tell the troops under his command in Iraq, “Be polite, be professional, but have a plan to kill everybody you meet”—but he regarded the first part of that instruction as important as the second part. A more common nickname among his peers was “Warrior Monk,” referring to the fact that he’s never married, reads deeply in history and philosophy, owns a library of about 7,000 volumes, and, in Iraq, carried a copy of Marcus Aurelius’ Meditations in his rucksack.

During the presidential transition, Trump asked him about torture. Mattis said that he’d squeezed more information from detainees using “a pack of cigarettes and a couple of beers.” The president-elect deferred to the general—or, as he liked to say in those days, “my generals,” the others being then–national security adviser H.R. McMaster, who was booted earlier this year, and chief of staff John Kelly, who will be joining the two in the private sector in January.*

In his first several months in office, Trump gave Mattis in particular a wide berth over not just tactics and strategy in the country’s wars but also broad policy. He was keen to withdraw U.S.

troops from Afghanistan, but Mattis and McMaster persuaded him otherwise. As Trump grew more confident in his own judgment (for reasons that are hard to fathom), and as he hired new advisers closer to his own views (notably Mike Pompeo as secretary of state and John Bolton as national security adviser), Mattis fell further out of his inner circle, disagreeing openly over not just alliances but policy toward Russia, the Iran nuclear deal, the security implications of global warming, and other matters.

The writing was on the wall in October, when Trump said in an interview that Mattis could go soon, adding, “I think he’s sort of a Democrat.” In Bob Woodward’s Fear, published a few weeks earlier, Mattis was quoted as saying, near the beginning of his term, that briefing Trump was like talking to a fifth- or sixth-grader.

On Thursday evening, in the wake of the Syrian pullout and the Mattis resignation, NBC News reported that Trump has ordered the Pentagon to draw up plans for the pullout of U.S. troops from Afghanistan.* [Update, 8:44 p.m.: The Wall Street Journal reported Thursday that Trump has ordered the start of the reduction of American soldiers in Afghanistan.]

Rather than raise a stink, as Trump’s first secretary of state, Rex Tillerson, had done, Mattis kept his head down and pursued his agenda more quietly. He led several new initiatives in NATO, most notably a plan to mobilize troops more rapidly to defend the Baltic states from Russian aggression. And many times he assured allied leaders that the United States would back them up, regardless of what they may have heard from other quarters—to the point where some leaders in allied nations, and on Capitol Hill, referred to the Department of Defense under Mattis as “the Department of Reassurance.”

A Cabinet secretary’s reassurances can go only so far, though, when it’s clear that the president—the ultimate decision-maker—disagrees. The same pattern occurred when Colin Powell was President George W. Bush’s secretary of state: Powell would say very welcome things on his trips to Europe, but after a while, they meant nothing, because it was clear they didn’t reflect the views of the man in charge.

Trump’s myriad departures from normal practice this past year have stirred concern in allied capitals, in Congress, and among U.S. diplomats and combatant commanders—his kowtowing to Russian President Vladimir Putin in Helsinki, his expressed “love” for North Korean dictator Kim Jong-un, his scorn for allies in once-cordial conferences, and now his withdrawals from Syria and Afghanistan, which aren’t entirely unreasonable except that they were so sudden and announced without appreciation of possible consequences or consultation with the regional players or even with his own security advisers.*

The departure of Mattis—the last “grown-up in the room”—is sure to set off tremors of anxiety. During the final phase of Colin Powell’s tenure as Bush’s secretary of state, a European diplomat asked how he was coping with all the mishandled crises of that administration (which, compared to the current president’s, now seem trivial). He reportedly replied, “I sleep like a baby … every two hours I wake up screaming.” We all may be doing that soon.

Correction, Dec. 20, 2018: This piece originally misstated that NBC News reported that Trump ordered the pullout of troops from Afghanistan on Thursday. NBC reported that Trump ordered the Pentagon to draw up plans for this purpose. The piece also misstated that John Kelly would be joining the private sector after January. As of publication, he plans to step down by the end of the year.