The resignation of Defense Secretary James Mattis, one of the last remaining moderates in a rapidly de-stabilizing West Wing, sent official Washington into a tailspin on Thursday. Capitol Hill was already reeling from Donald Trump’s impulsive decision to withdraw U.S. troops from Syria, a looming government shutdown, a sinking stock market, and, of course, the spectral presence of Robert Mueller. “I think it is a particularly dangerous time for our country now,” one former administration official told me Thursday night, shortly after a copy of Mattis’s withering resignation letter began circulating on social media.

Trump appeared to stamp an expiration date on Mattis in October, when the president unexpectedly described the retired four-star general as “sort of a Democrat” and mused that, “at some point everybody leaves.” But sources familiar with Mattis’s thinking largely dismissed speculation that Mattis would soon step down, citing his patriotic sense of duty. “Secretary Mattis always would say that he would stay as long as he could and as long as he was being effective with this president,” the former administration official told me. “But I think over the past 24 hours, he came to the realization that he was no longer being effective with this president.”

Once considered to be among the most influential members of Trump’s Cabinet, Mattis inevitably found himself at odds with the president on issues of foreign policy, particularly Trump’s disregard for historical alliances and contempt for global leadership. According to multiple reports, Trump’s decision to rapidly withdraw the estimated 2,000 U.S. troops in Syria was the last straw. On Thursday, The New York Times reported, that the defense secretary went to the White House to once again make his case for an American military presence in the region. When he was rebuffed, Mattis returned to the Pentagon and asked aides to circulate 50 copies of his resignation letter throughout the building. “He is a very principled man and believes in working within the confines of the organization that he works in and if he can’t work within that confine, he will step aside as opposed to trying to work around the process,” National Defense University Foundation President William Parker told me.

Within hours, it was reported that the Pentagon was also preparing to draw down troops in Afghanistan by roughly half—another policy with which Mattis vehemently disagreed. “I don’t think that he wants to stay there to be a punching bag,” the former administration official told me. As Parker noted, Mattis will have served his country for 50 years in January. “I am not surprised at all that if there was that type of disagreement that he would do the honorable thing and find a replacement,” he told me, “or at least try to help in that process.”

Mattis’s resignation is viewed by many as the final chapter in Trump’s bid to oust the so-called “adults in the room”—John Kelly, Nikki Haley, H.R. McMaster, Gary Cohn—who were supposedly keeping him in check. In his latest book, Bob Woodward recounts how, after Syrian President Bashar al-Assad launched a chemical attack in April 2017, Trump called Mattis and said he wanted to assassinate the dictator. Mattis, according to Woodward, said he would get right on it. Then he hung up the phone and announced to a senior aide, “We’re not going to do any of that.”

Now untethered, insiders fear that Trump will act haphazardly on his gut instincts, possibly with disastrous consequences. “I think he is going back to his base where he feels more comfortable,” the former administration official told me, noting that the president announced plans to pull out of Syria at a rally nearly a year ago and has wanted to pull out of Afghanistan since day one. “It has been the Kellys and the Mattises and the McMasters who have talked him out of it repeatedly, and so . . . I think now we are really getting into this period where the president is getting desperate, for personal reasons, and where the country doesn’t have people to be a buffer, between his whims and action.”