So, finally, Rex Tillerson gets the boot, leaving this much-vacated administration as arguably the worst—certainly the most passive—secretary of state in a century or longer.

President Donald Trump made the announcement this morning in his favorite form of communication—a tweet—to the apparent surprise of Tillerson, who, just hours before, had returned early from a trip to Africa, where he had been attempting to clean up the diplomatic mess caused by Trump’s “shithole” remark.

Tillerson proved ill-equipped for the ways of Washington and utterly inept when he gave the city’s games a go.

It wasn’t the first time in a week that Tillerson was blindsided. Trump’s surprise decision to meet with Kim Jong-un was made without consulting his top diplomat. In fact, just a few hours before that announcement, the long-beleaguered secretary had told a reporter that direct talks with North Korea were “a long way” off.

Several news agencies reported Tillerson’s imminent ouster back in November, and it was unclear Tuesday morning whether Trump merely delayed the announcement by four months or whether other factors have intervened.

Tillerson’s days seemed numbered even earlier, in October, when he pointedly declined to deny news reports that he’d referred to Trump as a “fucking moron” at an interagency meeting in July. Since then, the secretary has expressed views opposed to Trump’s on—among other issues—Russian cyberthreats, the wisdom of moving the U.S. Embassy in Israel to Jerusalem, the merits of preserving the Iran nuclear deal, and the idea of holding talks with North Korean diplomats (at the time, Tillerson wanted them and Trump undermined his efforts).

And yet Tillerson, who’d spent his entire adult life climbing the corporate ropes at Exxon Mobil, rising to the supreme posts of chairman and CEO, proved ill-equipped for the ways of Washington and utterly inept when he gave the city’s games a go. Most people in his position, finding themselves isolated from the White House, would cultivate countervailing centers of power—key legislators, the press, foreign leaders, or other conduits of influence. Or they would focus on an issue that they could dominate, in part because their bureaucratic competitors didn’t notice it or didn’t care. This is how Colin Powell operated in his brief time as George W. Bush’s secretary of state, and he may have prevented a small war between India and Pakistan in the process.

Tillerson did none of this. He presided over a mass exodus of the diplomatic corps and a hemorrhaging of his department’s budget. He tolerated his exclusion from key meetings of foreign policymaking, allowed himself to be outmaneuvered by the likes of Jared Kushner (who, as the Pentagon’s top officers learned, could easily be ingratiated and co-opted), and opened few, if any, back channels with Capitol Hill or the media.

His replacement at State, CIA Director Mike Pompeo (who was reported to be his successor when the stories first floated last fall and who, even at the time, was said to be prepping for the new job), might at least take his responsibilities seriously and—given his prior experience as a congressman—navigate the city’s shoals with greater savvy.

It could be that Trump put off firing Tillerson four months ago because, first, he didn’t want to confirm a press leak and, second, he didn’t think having an effective secretary of state was that important. Given his scornful attitude toward the pinstripes at Foggy Bottom and the enterprise of diplomacy in general, he may have liked the idea of letting the place flounder a little longer. (When Russian President Vladimir Putin kicked 775 U.S. diplomats out of Moscow, Trump thanked him for saving the cost of their salaries.)

Now, though, the summit with Kim is on the horizon, and even Trump may have awakened to the fact that a functional State Department might be useful. Pompeo will be in little need of remedial studies, as he’s been closely following North Korean events and politics from his perch at Langley. And he will likely find a crew of staffers at State, eager to welcome any substitute for Tillerson on the seventh floor.

Pompeo is more hawkish than Tillerson, on North Korea and Iran, and he has displayed loyalty to Trump on high-profile issues. For instance, while he echoed the intelligence community’s unanimous finding that the Kremlin interfered with the 2016 election in a way that helped Trump win, he added that the agencies had also concluded that the interference did not affect the election’s outcome. In fact, the official report by the director of national intelligence stated that there was no way to determine whether it affected the outcome, not least because intelligence agencies are proscribed from inquiring into domestic politics. Pompeo has also said that Kim Jong-un is “a rational actor” and therefore unlikely to launch a nuclear attack on the United States, knowing that we would retaliate. This contradicted the claim by Lt. Gen. H.R. McMaster, the national security adviser, that Kim could not be deterred from launching an attack. Yet Pompeo has not parted explicitly from Trump’s more belligerent approach to North Korea—though now, with the upcoming summit, he might pave a more moderate path that parallels Trump’s.

In the original news stories about the shuffle in personnel, Republican Sen. Tom Cotton of Arkansas was said to be poised as Pompeo’s replacement at CIA. This would have been a dreadful idea, and the good news today is that Trump hasn’t gone in that direction. Instead, Trump chose to move Gina Haspel, currently the agency’s deputy director, into the top slot—the first woman to be nominated to the job.

Haspel is a career intelligence officer, so the professionals at the agency—whom Trump has derided in the past as members of the “deep state”—will be pleased. But her nomination will trigger controversy. Haspel is caught up in the agency’s darkest recent scandal.

She ran a “black site” (euphemism for a torture-laden detention center) in Thailand in 2002.

Three years later, as chief of staff to the director of the CIA’s Counterterrorism Center, she was at least complicit in the destruction of documents on the agency’s waterboarding of terrorist suspects. In 2013, she was named director of the National Clandestine Service—running covert operations worldwide—but, after members of the Senate Intelligence Committee raised concerns about her past, she was given the job only on an acting basis. Pompeo made her his deputy just a year ago, despite similar protests.*

Whose head is next for the chopping block? McMaster has long been rumored as a candidate, especially after he declared, in the wake of Robert Mueller’s indictment of 13 Russians, that the evidence of Russian hacking was “incontrovertible.” The latest rumor is that he’ll be replaced by John Bolton, a longtime hawk’s hawk who advocates pre-emptive attacks against North Korea and Iran.

Trump’s national-security team may soon more fully reflect Trump’s policy instincts, but—especially given his eagerness to leap into high-level talks with the North Korean leader—it’s less clear than ever just what those instincts are or where they will lead us.

Correction, March 14, 2018: This article originally misstated that the Senate never confirmed Haspel as director of the National Clandestine Service due to protest within the Senate Intelligence Committee. The Senate does not formally confirm appointments to that post.