IT WAS announced, like so many of the president’s big decisions, in a tweet. “Mike Pompeo, Director of the CIA, will become our new Secretary of State. He will do a fantastic job”, wrote Donald Trump on the morning of March 13th. “Thank you to Rex Tillerson for his service!” Mr Trump, who appears not to have warned Mr Tillerson of his impending removal, also announced that Gina Haspel, deputy director of the CIA, would replace Mr Pompeo, becoming the first woman in that role. “Congratulations to all!”

What did for Mr Tillerson? In a subsequent press conference, the president said they “got along actually quite well. But we disagreed on things.” There had been a significant illustration of this the previous day, after Mr Tillerson strongly condemned the attempted assassination of Sergei Skripal, a former Russian double agent who was poisoned with a nerve agent in Britain last week. The then secretary of state, like the British government, blamed the Kremlin. “It came from Russia,” he said on March 12th. “I cannot understand why anyone would take such an action. But this is a substance that is known to us and does not exist widely.” Mr Trump, in what seemed like a remarkable lack of support for one of America’s closest allies, had at that time said nothing on the attack.

This was part of a longstanding pattern. Mr Tillerson, a former chief executive of Exxon-Mobil, had long seemed unimpressed by Mr Trump (he refused to deny reports that he had called him a “fucking moron”) and disagreed with most of his big foreign policy judgments. For example, Mr Tillerson had urged Mr Trump not to withdraw from the Paris climate agreement, or to back Saudi Arabia’s campaign against Qatar, or to move the American embassy in Israel to Jerusalem, all of which Mr Trump has done. He had also argued against decertifying the Iran civil-nuclear agreement, which in his absence seems increasingly likely. But perhaps more damagingly to his relationship with Mr Trump, who prizes loyalty above all, Mr Tillerson also distanced himself from the president’s equivocating remarks on the white supremacists who protested in Charlottesville last August. Mr Trump said there were some “very fine people” among them. Mr Tillerson, when asked if he shared that viewed, said: the president “speaks for himself”.

This might have made Mr Tillerson a hero to the establishment foreign policy types whose views he appeared largely to share. But unfortunately Mr Tillerson’s broadly sensible instincts on policy were not matched by his record as America’s chief diplomat. His diplomatic forays were leaden-footed; his personal efforts to broker an agreement between Qatar and its rivals was ill-prepared and a failure. His efforts as the state department’s chief executive were worse; Mr Tillerson accepted the administration’s demand for a massive cut in its budget (Congress did not) and launched a reorganisation of the department which appears to have succeeded mostly in driving out some of its top talent. Morale among America’s diplomats is at an all-time low. Mr Tillerson’s execution of his third main duty, as explainer-in-chief of American foreign policy, was even worse. He hated speaking to journalists and during his first year in the job, rarely did so.

He was not helped by the way Mr Trump repeatedly undermined him. The president’s son-in-law, Jared Kushner, was permitted to claim some of the most important parts of his portfolio, including America’s relations with China, Mexico and Saudi Arabia. And worse, Mr Trump was fond of issuing tweets about Mr Tillerson’s performance. After Mr Tillerson suggested he had several lines of communication into North Korea—a basis, perhaps for opening negotiations—Mr Trump tweeted that he was “wasting his time”. After Mr Tillerson refused to issue an explicit denial of “morongate”, Mr Trump suggested the two men took IQ tests—“and I can tell you who’s going to win”. To be fair, it is arguable that Mr Trump undermined himself more in this case.

Mr Tillerson’s exit had been expected for several months. In November the New York Times reported on a leaked plan to replace him with Mr Pompeo. Still, his sacking appears to have surprised Mr Tillerson. A state department spokesman said he had not been alerted to it beforehand and did not know why he had been fired. “The secretary had every intention of staying because of the critical progress made in national security,” he said in a surprisingly spiky statement. Officials at the White House told reporters that Mr Trump wanted Mr Tillerson gone in order to get a new team in place before talks with Kim Jong Un that the president hopes to hold by May.

Mr Pompeo, a former Republican congressman from Kansas, seems to rub along with Mr Trump more successfully. As CIA director he was a frequent presence at the White House and seems to have made this one of his top priorities. Though he has disagreed with the president—notably, Mr Pompeo has maintained that Russia sought to influence the general election in 2016, though he was criticised for saying this had not altered its outcome—he is likely to be more supportive of Mr Trump’s “America First” view of the world than Mr Tillerson was. The two men “are almost always on the same wavelength”, the president said on March 13th. If that is even half-right, it is worrying.