Matt Potter, a British journalist and broadcaster, is the author of "The Last Goodbye: A History of the World in Resignation Letters."

Defense Secretary Jim Mattis’s letter of resignation to President Trump starts ominously, with a frosty disregard for White House form.

H.R. McMaster, in his letter resigning his post as national security adviser, had been “thankful to Trump for the opportunity to serve him and our nation.” Even former attorney general Jeff Sessions, unceremoniously asked to resign, had managed an “Apprentice”-like response: “Thank you for the opportunity, Mr. President.” But in Mattis’s letter, there’s a gaping hole where the addressee — who lives for public flattery — should be. “I have been privileged to serve as our country’s 26th Secretary of Defense which has allowed me to serve alongside our men and women of the Department in defense of our citizens and our ideals,” Mattis wrote, conspicuously avoiding any expression of delight, honor or gratitude toward the president.

That’s just the opening.

“My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues,” Mattis wrote to a president whose decades have been informed by no such immersion. He continued, pointedly: “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.”

No one saw the letter as anything but a stinging protest. “Old Marines never die, but they do resign after the President ignores their advice, betrays our allies, rewards our enemies, and puts the nation’s security at risk,” Rep. Adam B. Schiff (D-Calif.) wrote in a tweet, referencing Mattis’s storied career in the Marine Corps.

I’ve studied resignations for 28 years. I’ve written a book about them — the world viewed through the medium of the kiss-off, from classical times to the modern day. History is written as much in endings as beginnings. The pivotal changes can arrive not with “Eureka!” moments but with adamant refusals.

The popular image of the big exit is a grandstanding, impromptu “Jerry Maguire” moment (“Who’s coming with me?”). Yet the most effective leave-takings are composed over time and with military precision. These are made up of the words, distilled from private agonies, that we place on the public record. They must function as appeals to history — as, in a case like Mattis’s — or one good grenade.

The United States armed forces are home to a “go-down-fighting” resignation-letter subculture all its own. The military tradition of explosive, often cutting letters began in 1979 by Air Force Capt. Ron Keys, who served as a pilot in the Vietnam War. His resignation, tendered to Gen. Wilbur Creech, contained legendary and often-imitated lines: “The General looked us in the eye and said, in effect, ‘Gentlemen, either I’m very stupid or I’m lying to you’” and “All those Masters and professional military educators and not a leadership trait in sight!”

Keys later said he hadn’t intended to send the letter that began “Dear Boss, Well, I quit.” He’d written it out of frustration late one night and mailed it by accident. Nobody bought that, least of all Creech. But the general did invite Keys to a meeting to elaborate. Keys’s recommendations were heard, his resignation rescinded. By the time he retired in 2007, he was Gen. Ronald Keys, commander of Air Combat Command. But it was the frazzled, almost comedic howl of rage that was Keys’s resignation, rather than the officer’s career, that was most widely remembered. Passed around and published, it quickly formed the template for what became known as the “Dear Boss” letter — Air Force slang for the frustrated officer’s resignation as unrestrained truth attack.

Planned, polished and executed for maximum effect, Dear Boss letters are ambushes by nature. The most famous — before Mattis’s on Thursday — was that of the highly decorated Army Col. Millard A. Peck, who resigned in 1991 as head of the Pentagon intelligence unit assigned to search and account for missing-in-action servicemen in Vietnam. Over four pages of complaints that would doubtlessly ring bells with Mattis, Peck wrote of being “painfully aware … that I was not really in charge of my own office, but was merely a figurehead or whipping boy for a larger and totally Machiavellian group of characters.” His department, he said, was nothing but “a ‘toxic waste dump’ designed to bury the whole mess out of sight and mind in a facility with limited access to public scrutiny.”

He stapled the letter to his office door and strode away from his command.

In a country still ambivalent about remembering Vietnam and haunted by the possibility of prisoners of war as well as those missing in action, the effect was electric. Within weeks, the Senate Foreign Relations Committee opened a public hearing. Peck ended up overseeing administrative services for military ceremonies. He had taken the hit, but he’d got the result he wanted: a national public reckoning with the way the military looked after its own.

Mattis’s Dear Boss letter sits squarely in this military tradition. It is a reckoning and a duty, at whatever cost. It may have been a surprise to us and, one must imagine, to Trump — no secretary of defense had ever resigned in protest. But it was not a surprise to Mattis. Most striking throughout his letter is the avoidance of even the most boilerplate terms of esteem or loyalty toward the president. With Trump’s craving for personal fealty from former employees — something of a lifelong obsession (and a sore spot right now, as he fumes on Twitter about his former lawyer Michael Cohen turning “rat”) — Mattis’s choice of words, and silences, would seem to represent some of the subtlest and most carefully pointed trolling imaginable.

But Mattis’s letter is no simple insider hit. It could serve as a manifesto for his — perhaps even the president’s — successors. A vision of a still-possible future in which American security is better served in alliance and cooperation, not isolation, and, above all, a more unifying, honest presidency. Just perhaps — and this has always been key to the “Dear Boss” tradition — it is Mattis showing Trump, pointedly, how leadership should be done and what dignity and discretion look like.

Mattis’s letter echoes one from outside the military, too. By invoking the NATO democracies’ commitment to fighting alongside the United States in the aftermath of 9/11 to warn against isolationism, it is a direct successor to an open letter from 2003 that Mattis must know well: The diplomat John Brady Kiesling wrote to Secretary of State Colin Powell protesting what he saw as the frittering away of support and goodwill toward the United States from allies around the world. Kiesling, a career diplomat who had served in U.S. embassies from Israel to Greece and the former Soviet Union, had watched in horror as the George W. Bush administration rode roughshod over allies’ concerns to force the case for war in the Middle East. Finally, he could no longer bite his tongue. His letter provides something of a voice-over for Mattis’s own:

“Our fervent pursuit of war with Iraq is driving us to squander the international legitimacy that has been America’s most potent weapon of offense and defense since the days of Woodrow Wilson,” Kiesling wrote.

“We have a coalition still, a good one. The loyalty of many of our friends is impressive, a tribute to American moral capital built up over a century. … Loyalty should be reciprocal. Why does our President condone the swaggering and contemptuous approach to our friends and allies this Administration is fostering, including among its most senior officials? … When our friends are afraid of us rather than for us, it is time to worry.”

Kiesling’s resignation was an early crack in the consensus view of the Bush administration’s foreign policy adventures. It precipitated a spate of similar letters, including that of Pentagon official Karen Kwiatkowski, who skewered then-Defense Secretary Donald H. Rumsfeld with a public but anonymous “Dear Boss” that cast his reign as chaotic, dishonest and dangerous. The letters helped spur an honest reevaluation of the war and something approaching soul-searching from the American media about their role.

Reaction from U.S. allies to Mattis’s departure is characterized by worry at the prospect of an unrestrained Trump, flanked by hawks such as national security adviser John Bolton.

Carl Bildt, the former Swedish prime minister who is now a chairman of the European Council on Foreign Relations, called it “a morning of alarm in Europe."

But resignations are never just departures. They can spell the beginning of the end for seemingly invulnerable leaders whose autocratic tendencies or lack of restraint have become liabilities. Such was the case for British Prime Minister Margaret Thatcher. The resignation of a once-loyal senior official set her downfall in motion. Over the past three decades, Sir Geoffrey Howe’s resignation to her, like the Dear Boss letter, has become a template for diplomats and statespeople, plundered as much as admired.

Like Mattis, Howe, Thatcher’s deputy prime minister, was seen as the last moderating influence on an unpredictable and increasingly autocratic leader. He was seen as a foreign policy expert and the “grown-up in the room.” Over the years, he had counseled diplomacy over confrontational rhetoric. (So steady was he in comparison with the increasingly unpredictable Thatcher that he was assigned the nickname Mogadon Man, after the popular tranquilizer brand.) His resignation in protest in November 1990 came at Thatcher out of left field.

Reading his letter of resignation to Parliament, he talked of how “every step forward risked being subverted by some casual comment or impulsive answer” and compared serving under Thatcher’s leadership to being a sportsman who is sent out to play only to find, at the moment they square up to hit the first ball, “that their bats have been broken before the game by the team captain.” It is an analogy that Mattis, sidelined since the summer by Trump and the hawkish likes of Bolton, would undoubtedly recognize.

Howe’s resignation ended: “The time has come for others to consider their own response to the tragic conflict of loyalties, with which I myself have wrestled for perhaps too long.” Sure enough, his resignation prompted a rush of such responses. Nine days later, Thatcher, the Conservative premier who had seemed so invulnerable, was gone.

More than just the frustrations of a military man, Mattis’s resignation seems to be about the need to choose a side and the sense that time is running out. As Hemingway wrote in “The Sun Also Rises,” one goes bankrupt in two ways: “gradually and then suddenly.” The same is almost always true of the crumbling of administrations. Resignations tend not to come alone. On Saturday, two days after Mattis’s resignation, Brett McGurk, the U.S. envoy to the international coalition fighting the Islamic State, tendered his own resignation protesting Trump’s abrupt decision to withdraw from Syria.