The story is told of Jim Mattis, when he was the commanding general at Quantico, relieving a young lance corporal on Christmas. The rest of that wintry day, those entering the front gate of the Marine base were startled to see that the sentry was a general, checking passes and waving cars through so that a young man could spend the holiday with his family. It is the kind of behavior animated by sentiments Donald Trump could not understand, and it reflected a kind of code by which he cannot live.

The president misunderstood his secretary of defense. The Jim Mattis one saw on the battlefields of Afghanistan and in the shattered cities of Iraq was not “Mad Dog,” a sobriquet he loathed, but a resolute military leader who was a reader and a thinker. Give him a copy of Marcus Aurelius’s Meditations, and he would compare it with the other two editions that he already owned.

He was, to be sure, a fierce enemy. In 2005, he got into trouble for saying, “You go into Afghanistan, you got guys who slap women around for five years because they didn’t wear a veil. You know, guys like that ain’t got no manhood left anyway. So it’s a hell of a lot of fun to shoot them.” He was also the man who said, “Be polite, be professional, but have a plan to kill everyone you meet.” And he meant it. He did not think you had to hate an enemy to kill him, but that just made him a more formidable leader in combat. His menace to America’s battlefield enemies was that of the superbly calm tactician, not the blood-crazed berserker.

Read: James Mattis’s letter of resignation

Mattis was also the man who said, “Engage your brain before you engage your weapon,” the commander who praised the quick-thinking Marine squad leader who was smart enough to take a knee when he saw a Shia funeral procession filled with armed men walk by in the newly liberated streets of Nasiriyah, in southern Iraq. And above all, he was the division commander who, when his tour was over, got in a car and crossed the country visiting families of his fallen Marines. To see him explaining to his security detail and his driver the political importance of driving into downtown Ramadi to hobnob with the potentially hostile sheikhs was to see leadership of a subtle kind. Those young Marines were ready to follow him anywhere. Literally, anywhere.

The president had a vague notion of the killer part when he appointed Mattis. He had no notion of the morally and strategically informed restraint, of the intellectual sophistication, of the selflessness.

It was not Mattis’s idea to become secretary of defense, and indeed, he may not have been the best pick for the job in normal times. But then again, 2017 was anything but a normal time, and even those who believed that the job should in principle go to a real civilian rather than a retired general were relieved that Mattis took it. In office, he had to spend most of his time buttressing the alliances that the president despised, and affirming values of fairness and legality that Trump could not comprehend. Success in government is often measured less by the brilliant things one does than by the stupidities one prevents. By that standard, Mattis’s tenure as secretary of defense was a success.

Read: The Trump administration’s lowest point yet

His story, however, has a larger significance. From the unlikely victory of Trump in the November 2016 election to the present, some have argued that principled patriots could serve in high office, retain their character, and either mitigate the damage or do some positive good. To be sure, they would need their red lines, their signed-but-undated letters of resignation. But they could pull it off. Though they might be maligned by irresponsible enemies of the administration, they would serve the country, and do so more honorably than mere critics.

Mattis indeed had his walking points, and he leaves with his head held high. But he is alone. The clusters of sub-Cabinet officials who privately boasted about their walking points have, with very few exceptions, stuck it out. They give sickly smiles when, at a seminar or dinner party, someone describes the president’s character as it is; they give no evidence of sticking their necks out to take positions that might incur the wrath of the America Firsters; they have taken the mad king’s shilling, and they are sticking with the king.

The departure of Jim Mattis from government service is proof that you cannot have it all. You have to walk if you are to remain the human being you were, or conceived yourself being, before you went in. He alone refused to curry favor, to pander at the painful televised Cabinet sessions, or to praise someone who deserved none of it. In the end, he could not do his job and serve the country as he knew it had to be served. No one could.

Thomas Wright: Trump, unchecked

Henceforth, the senior ranks of government can be filled only by invertebrates and opportunists, schemers and careerists. If they had policy convictions, they will meekly accept their evisceration. If they know a choice is a disaster, they will swallow hard and go along. They may try to manipulate the president, or make some feeble efforts to subvert him, but in the end they will follow him. And although patriotism may motivate some of them, the truth is that it will be the title, the office, the car, and the chance to be in the policy game that will keep them there.

They may think wistfully of the unflinching Sir Thomas More of Robert Bolt’s magnificent play about integrity in politics, A Man for All Seasons. But they will be more like Richie Rich, More’s protégé who could have chosen a better path, but who succumbed to the lure of power. And the result will be policies that take this country, its allies, and international order to disasters small and large.

Jim Mattis’s life has been shaped by the Marine motto: semper fidelis, always faithful. Against the odds, he remained faithful to his beliefs, to his subordinates, to the mission, to the country. The president who appointed him to the office might have as the motto on his phony coat of arms numquam fidelis, never loyal. His career has been one of betrayal—of business partners, of customers, of subordinates, of his wives, and as we may very possibly learn from Robert Mueller, of his country. The two codes of conduct could never really coexist, and so they have not.