– Last year, during one particularly frenetic stretch in Donald Trump’s presidency, a top GOP senator said there were three men guarding the country from chaos: Defense Secretary Jim Mattis, White House Chief of Staff John Kelly and Secretary of State Rex ­Tillerson.

Within weeks, not one will be left in the administration.

Mattis is the last to go, and his abrupt resignation Thursday marks the end of the “contain and control” phase of Trump’s administration — one where generals, business leaders and establishment Republicans struggled to guide the president and curb his most disruptive impulses. They were branded in Washington as the “troika of sanity,” the “axis of adults” and the “committee to save America.”

But as Trump careens toward his third year in office, their efforts are in tatters and most are out of a job.

The early consequences were apparent at year’s end: a government shutdown over the advice of GOP leaders and Trump’s order to withdraw U.S. troops from Syria over Mattis’ objections. A similar pullback in Afghanistan appeared to be in the works. The financial markets, spooked by uncertainty from a nearly yearlong trade war, tanked.

“We are headed toward a series of grave policy errors that will endanger our nation, damage our alliances & empower our adversaries,” Sen. Marco Rubio, R-Fla., tweeted after Mattis’ resignation.

The shrinking circle around Trump is now increasingly dominated by a small cadre of longtime loyalists and family members, ex-Fox News talent and former GOP lawmakers who were backbenchers on Capitol Hill before being elevated by Trump. Attracting top flight talent will only get more difficult as more investigations envelop the White House once Democrats take over the House in January.

To some of Trump’s most ardent supporters, the exodus leaves the president with a team that is more in line with his hard-line campaign promises. They viewed some of his early advisers as obstacles to enacting the nationalist agenda they believe Trump had been elected to implement.

In his resignation letter, Mattis said that Trump deserved a Pentagon chief “whose views are better aligned with yours.” It was not readily apparent who that might be because Trump’s decision in Syria drew widespread bipartisan condemnation this week.

Soon after Trump took the oath of office, aides seeking to restrain the brash, inexperienced president’s foreign policy decisions recognized that those best adept at advising him were or had recently been in uniform. Trump, who never served himself, granted them outsized respect.

Mattis was one of three generals who filled the top ranks of Trump’s staff, along with Kelly and H.R. McMaster, who spent a year as national security adviser. Mattis’ appointment required a congressional waiver to laws meant to preserve the civilian nature of the Department of Defense.

Mattis and outgoing Chairman of the Joint Chiefs Joseph Dunford became Trump’s almost weekly dinner guests early in his administration. The seemingly informal briefings were in fact carefully orchestrated persuasion sessions designed to ease Trump into abandoning some of his campaign rhetoric and accepting the advice of his senior national security advisers.

But Mattis’ departure highlights how those early efforts delayed Trump’s disruption, rather than averted it.

On issues from trade to defense, Trump aides have tried eye-popping tactics to wait out the president — Gary Cohn, former chair of the National Economic Council, went so far as to remove documents related to a tariff action from the Resolute Desk in hopes of convincing the president to adjust course — but their exertions proved fleeting.

Mattis’ decision to resign followed a clash with the president over withdrawing troops from Syria, where a small military force has been fighting ISIS. Trump is also said to be seeking to draw down U.S. forces in Afghanistan, another move with which the Pentagon disagrees.

Trump’s split with Mattis followed a pattern of public breakdowns with advisers who served as guardrails in the administration.

Trump initially hailed Tillerson, the ExxonMobil chief executive, as out of “central casting” when he was tapped as secretary of state, before being unceremoniously discarded by the president earlier this year. Earlier this month, Tillerson described Trump as “pretty undisciplined, doesn’t like to read, doesn’t read briefing reports, doesn’t like to get into the details of a lot of things, but rather just kind of says, ‘This is what I believe.’ ”

Kelly suffered a similar fate. Hired to bring order to the Oval Office, the retired Marine ultimately found he, too, could not control Trump, who subjected Kelly to a series of public humiliations. Kelly is slated to leave in two weeks.

Trump treated Mattis with respect in announcing his departure via tweet, though he cast the move as a retirement rather than a resignation.

It was Mattis who made clear in his letter that he was leaving over a dispute with the president. Still, he said he would remain on through February to allow Trump time to nominate and confirm a successor, expressing concern about high-level turnover at the Pentagon at a critical juncture.

Indeed: The last of the committee to save America was trying to mitigate the damage one last time.