John Bolton was seen as an odd choice when Donald Trump chose the foreign policy hawk to succeed HR McMaster as the White House national security adviser in March 2018.
Aside from his trademark moustache, which Mr Trump hated, he was a proponent of employing American power oversees in the kind of muscular way that Mr Trump had rejected during his 2016 campaign.
Eighteen months later, Mr Bolton met a similar fate as Mr McMaster — fired by a president who had grown frustrated at his efforts to thwart his foreign policy on everything from Iran and North Korea to Russia and, just last weekend, Afghanistan.
When Mr Bolton entered the West Wing — after being passed over for Mr McMaster the previous year — there was no mystery about his views. In newspaper articles and appearances on Fox News, the unrepentant supporter of the Iraq war had argued that the US should push for regime change in Iran and strike North Korea.
In his new role, Mr Bolton argued that his job was to advocate for the policies of Mr Trump. But unlike Mike Pompeo, the equally hawkish secretary of state, the former Bush administration official failed to leave his own views at the White House doorstep and continued to push Mr Trump in directions that matched his world view.
“Bolton made a cardinal mistake. He would get ahead of the president and almost try to box him in — including on North Korea,” said one former senior official.
One White House official said Mr Trump had grown increasingly angry with Mr Bolton in recent months, chafing at his hardline views and his reluctance to defend the president. Mr Bolton was conspicuously absent from TV talk shows, particularly when Mr Trump had pushed policies that he opposed, such as his suggestion at the G7 in France that Russia should be invited back into the club.
The official said Mr Trump decided to fire Mr Bolton over the past 48 hours after deciding that “enough was enough”. The move came just days after Mr Bolton strenuously opposed a plan by Mr Trump to bring members of the Taliban to Camp David, the presidential retreat, to sign a peace accord to end the conflict in Afghanistan.
While the Afghanistan dispute was the final straw, there were already clear signs that Mr Bolton was under pressure. He did not attend some of Mr Trump’s meetings with North Korean dictator Kim Jong Un, including an important session in Hanoi in February and when the two leaders met in June in the demilitarised zone.
There were other signs of conflict. Shortly after Mr Bolton said in May that North Korean missile tests had violated UN sanctions, Mr Trump contradicted him at a press conference by saying, “I view it differently”.
The current and former officials said Mr Trump erupted at Mr Bolton in March for sparking an embarrassing controversy over US sanctions on Chinese firms.
The day after Treasury imposed sanctions on two Chinese shipping companies accused of helping North Korea, Mr Trump tweeted that he had “ordered the withdrawal” of the measures. Officials scrambled to defend the tweet by claiming that he was referring to another batch of sanctions that were in the planning stage.
But the officials said Mr Bolton had led Steven Mnuchin, the Treasury secretary, to believe that Mr Trump supported the move to sanction the Chinese companies, when in fact that was not the case.
“They had tried to misrepresent what Potus was thinking and Potus got upset,” said the former official, using a commonly used government acronym for the president of the United States.
The White House official said the incident became a “sticking point” in the relationship between Mr Trump and Mr Bolton since it underscored the view, held by some other officials, that Mr Bolton was not an honest broker.
Mr Bolton was not always alone in his opposition to Mr Trump. After the president abruptly called off a military strike on Iran following the downing of a US drone, Mr Pompeo joined Mr Bolton in opposition. But the 70-year-old, Yale-educated lawyer in recent months was increasingly at odds with Mr Pompeo, and also did not have a good relationship with Mick Mulvaney, White House chief of staff.
On Iran, Mr Trump and Mr Bolton agreed on withdrawing from the nuclear deal the Obama administration and world powers signed with Tehran in 2015. But Mr Bolton was very sceptical of the push by Mr Trump to meet Iranian president Hassan Rouhani, just as he did not endorse the three summits with Mr Kim.
Underscoring the chaotic nature of personnel decisions in the Trump administration, Mr Bolton had been scheduled to appear at a White House news conference on Tuesday alongside Mr Pompeo and Mr Mnuchin. But the two secretaries were left to explain the sudden departure of their colleague just after Mr Trump’s tweet.
Mr Pompeo said smilingly that he was “never surprised” when asked if he had been caught off guard by the dismissal. While he declined to discuss the “palace intrigue” surrounding the firing, he conceded having had differences with Mr Bolton. “There were many times Ambassador Bolton and I disagreed. That’s to be sure.”
The dismissal of Mr Bolton marked another victory for Mr Pompeo, a master at managing the president.
“Bolton had many ideological foes in the administration, and they seem to have been successful persuading the president that Bolton was undermining him, leaking about him, or boxing him in,” said Jon Alterman, a foreign policy expert at the Center for International and Strategic Studies.
The former official said that while some members of the Trump team were able to use their relationship with Mr Trump to further their goals, Mr Bolton had gone too far. “Bolton tried to take advantage and even tried to manipulate Mr Trump. He misunderstood how to use his power.”
Loren DeJonge Schulman of the Center for a New American Security, said Mr Bolton had “failed at all the critical elements” of the job and used the position “as a means to enact his personal policy agenda”.
While Mr Bolton was a polarising figure, he was an important supporter of US alliances working for a president who has been quick to attack close allies from Japan and South Korea to Germany. He also received praise in some quarters for his disdain for the shoot-from-the-hip approach Mr Trump has employed on foreign policy.
But ultimately his lack of support for negotiating with regimes such as Iran and North Korea made his position untenable with Mr Trump, who likes to tout his “art of the deal” prowess and wants to make deals for the 2020 election.
“The fact that Trump fired him personally, which he almost never does, shows how desperate he is to portray himself as a dealmaker in the run-up to the election,” said Tom Wright of the Brookings Institution.
“Bolton failed as national security adviser but he was right on one thing — playing footsie with America’s enemies with no preparation or strategy is a bad idea.”
Follow Demetri on Twitter: @dimi