When President Donald Trump announced in 2017 that the U.S. would leave the Iran nuclear deal, his administration already had a plan in place. The Trump team didn’t want to back away quietly from the accord. Instead, it wanted total economic annihilation of Tehran, the government’s military proxies, and its most powerful business sectors in order to compel the Iranians to renegotiate or to convince the people of Iran to rise up against the regime.

The White House and State Department pulled in outside experts from prominent hawkish think tanks to help. But the main architect of that policy was John Bolton. For years, Bolton had been steadfast in his strategy of maximum pressure against Tehran. And in April 2018, he found himself in a position to turn that advocacy into a reality after Trump tapped him to serve as his national security adviser.

The marriage was not to be. Though the Trump administration has increasingly adopted a hard line on Iran, the president himself gradually drifting away from the hawkish approach that Bolton personified.

Things came to a head over the last few weeks, according to two U.S. officials and three individuals involved in national security policy in the Trump administration. In conversations with the former national security adviser and others, Trump said he was considering meeting Iranian President Hassan Rouhani on the sidelines of the United Nations General Assembly in September. One of the main asks by the Iranian regime for such a meeting was that the U.S. agree upfront to ease some sanctions on the country.

For Bolton, the fact that Trump was even considering the request was the final straw, according to three U.S. officials—because it was evidence that the president had lost trust in his counsel. One U.S. official told Time magazine that as Bolton and Trump talked one last time, the conversation quickly centered around the question: “Why are you meeting with Rouhani?”

On Tuesday, Trump announced that he had fired Bolton, citing disagreements “with many of his suggestions.” Bolton quickly disputed being fired, telling The Daily Beast—among other outlets—that he had offered his resignation the night before.

Whether he was forced out or left willingly merely obscures the fact that his final months on Team Trump were filled with tension, infighting, and increasingly divergent world views. The level of trust between the president and his now former national security adviser had rapidly deteriorated—to the point that President Trump had told several advisers to keep an eye on Bolton for press leaks and backstabbing.

Two senior administration officials say that in recent weeks each had directly complained to Trump—including in the Oval Office—about Bolton, and their beliefs that the foreign-policy hawk was a prolific leaker to the media, including when he would lose out on internal squabbles and policy fights. The president, the sources noted, did not explicitly agree with their suspicions, but in both cases asked the venting official to be vigilant and report back to him with anything he needed to know.

On Tuesday afternoon, Bolton messaged The Daily Beast that allegations that he was a leaker are “flatly incorrect.” But the image of him as someone who dished about internal affairs was potent enough that it was offered up by Hill Republicans as a perfectly acceptable rationale for Trump to have given him the axe.

“I like John Bolton,” said Senator Lindsey Graham (R-S.C.). “I thought he did a good job, I shared his worldview, however I think the trust was lost—there’s a view that the leaking allegation is pretty sensitive to the president.”

While Bolton may or may not have leaked, he certainly didn’t carry water, at least not to the degree that Trump famously demands. Multiple sources confirmed that the national security adviser ducked out of “soft-booked” and scheduled Sunday-show interviews over the summer explicitly because he didn’t want to defend Trump on several issues.

The points of disagreement were not small, either. Two officials told The Daily Beast that Bolton argued aggressively against the president bringing representatives from the Taliban and the Kabul government to Camp David for a formal meeting, telling Trump that the optics of bringing members of the Taliban on U.S. soil so close to 9/11 would be inappropriate. Trump ultimately canceled the meeting. But one other official said Bolton also advised him to keep U.S. troops in Afghanistan beyond the 2020 presidential election—something the president has vehemently opposed.

Bolton’s hawkish advocacy, and unbending nature, had made him enemies in the upper echelons of the administration. He departed with few senior officials willing to pat him on the back on his way out. At a press briefing on Tuesday, neither Secretary of State Mike Pompeo nor Treasury Secretary Steve Mnuchin showed much sadness.

“There were many times Ambassador Bolton and I disagreed,” Pompeo told reporters. “That’s to be sure, but that’s true with a lot of people with whom I interact.”

For several hours on Tuesday, Trump and his senior staff seemed to go out of their way to trash the just-departed Bolton on the record, via tweets and text messages. Bolton was more than happy to return fire in this quintessentially Trumpian flame war. At times, it devolved into an online debate between a president and his former national security adviser over whether this was a case of “you can’t fire me, I quit,” or the other way around.

The mechanics of the dismissal were of less importance to foreign policy hands than the political outcomes that would result from it. Having advocated for years for the U.S. government to get demonstrably more aggressive towards Iran, Bolton’s departure almost certainly made a diplomatic overture more likely.

“Bolton’s departure doesn’t make a Trump-Rouhani meeting on the sidelines of UNGA a foregone conclusion. But it makes it somewhat more likely. An absolute precondition for any such encounter on Iran’s side is a relaxation of U.S. sanctions,” said Robert Malley, a former member of the National Security Council under President Obama. “We know that Trump was open to such a relaxation—and that Bolton was fundamentally opposed. There are still many obstacles to the Trump-Rouhani encounter, and Iran will want a substantial price for what it deems a substantial step. But at least one of those obstacles has just been removed.”

—With additional reporting by Sam Stein and Sam Brodey