That dire situation is now upon us. So what happens next?

Read: James Mattis’s letter of resignation

President Donald Trump’s views are well known to anyone who cares to look. In his speeches over the past two years, he has consistently identified four threats to America—immigrants, alliances, trade deficits, and terrorism. (He used to talk a lot about North Korean nuclear weapons, as well, but appears to have since struck a de facto bargain with Kim Jong Un. North Korea has ceased testing missiles and nuclear bombs, and relations between the two countries have warmed.) Over three decades, Trump has consistently expressed admiration for authoritarian leaders, especially in Russia. But above all, Trump wants the freedom to do as he wants, when he wants, free from constraints. He wants to be indulged. He wants to be a king.

The turning point of the Trump administration came on July 17, 2017. For the first six months of his presidency, Trump largely deferred to the so-called axis of adults of Tillerson, McMaster, and Mattis. When he diverged from their advice—when, for example, he refused to endorse Article 5 of the North Atlantic Treaty while speaking at NATO headquarters—he soon backtracked under pressure. But on July 17 he had had enough. He was sitting through yet another interagency meeting, this time on the Iran nuclear deal, known as the Joint Comprehensive Plan Of Action. Not only did all of his advisers recommend staying in the deal—the three options in front of him required it. He agreed to effectively extend the deal one more time but demanded that the next time, he be given an option to withdraw.

After that meeting, Trump began to push back. He started giving orders unilaterally—to move the embassy to Jerusalem, to meet with Vladimir Putin, to meet with Kim Jong Un, and even to hold a military parade. But as long as the axis of adults remained in place, he was constrained. So he began to force them out. If there is a common theme behind the reshuffle, it is that Trump replaces independent thinkers with sycophantic loyalists or those too weak to stand up to him. If past practice is any guide, Trump will double down on loyalists when he replaces Mattis. Men such as John Bolton and Mike Pompeo do not agree with Trump on many issues, but they value their loyalty to him personally above their own views and they will never try to thwart his will.

Read: The Trump administration’s lowest point yet

Bolton learned this lesson early on. When he became national-security adviser, many observers commented on the irony that his first task would be to implement a policy of diplomatic outreach toward North Korea, something he opposed so vociferously in his previous time in government that President George W. Bush fell out with him over it. Three weeks into the job, Bolton tried to sabotage the talks by claiming that the administration was looking to the Libya model, whereby Muammar Qaddafi unilaterally disarmed. It was apparently intended as a dog whistle that would pass unheard by Trump but that would cause the North Koreans to sink the talks before they began. The North Koreans were furious, as intended. The South Koreans also noticed, though, and complained to Trump. Pompeo backed them up, and Trump was furious. Bolton was excluded from high-level meetings with North Korean officials and was only added to the Singapore summit at the last minute. He learned his lesson—he has not again explicitly worked against the president.