President Trump on Tuesday fired national security adviser John Bolton, saying the two disagreed on many issues.

The move comes just days after Trump canceled a Camp David summit with the Taliban that was supposed to result in a breakthrough on the conflict in Afghanistan.

Trump announced the firing in a tweet, saying he had informed Bolton his “services are no longer needed.” Bolton turned in his resignation early Tuesday.

Trump said he would name a new national security adviser next week.

Bolton, who also was at odds with Secretary of State Mike Pompeo, had a different take, tweeting he offered to resign Monday night and the president put him off.

He told the Washington Post: “Let’s be clear, I resigned, having offered to do so last night.” Pressed further, he said: “I will have my say in due course. But I have given you the facts on the resignation. My sole concern is U.S. national security.”

Bolton became the nation’s 27th national security adviser – Trump’s third following Michael Flynn and H.R. McMaster – in April 2018. He previously had served as U.S. ambassador to the United Nations during the Bush administration and was a senior fellow at the American Enterprise Institute as well as a political commentator and Republican consultant.

Bolton is a foreign policy hawk, advocating for regime change in Iran, Syria, Libya, Venezuela, Cuba, Yemen and North Korea. He also was believed to have prodded Trump to pull out of the Iran nuclear deal. While Trump campaigned on getting the U.S. out of costly foreign entanglements, Bolton was an architect of the 2003 Iraq war.

The firing came just two days after Trump announced a weekend retreat with Afghan insurgents at Camp David had been canceled. On Monday, Trump declared the peace talks were dead.

The first rift with the president was over North Korea. Bolton has advocated for pre-emptive airstrikes against Pyongyang’s nuclear facilities but Trump consistently has ignored Bolton’s advice on the issue, preferring instead face-to-face encounters with Kim Jong Un. Bolton reportedly has worked secretly to scuttle progress in any talks.

Bolton tried to orchestrate the ouster of Venezuelan President Nicolas Maduro, backing opposition leader Juan Guaido but the effort has yet to bear fruit and Trump apparently lost patience with the scheme.

On Iran, Trump wanted to negotiate a new deal with Tehran while Bolton wants to topple the regime and replace it with a friendlier one.

The rift between Trump and Bolton began growing in May following the president’s trip to Japan. Bolton told reporters North Korea had violated U.N. resolutions by conducting short-range missile tests, but Trump said he viewed the situation “differently,” opting to preserve his relationship with Kim.

Shortly thereafter, Trump canceled an airstrike on Iran that was supposed to be retaliation for damage to two tankers and the shooting down of a drone. Bolton also was conspicuously absent from Trump’s foray into Korea’s demilitarized zone.

Bolton was fired less than two hours before he had been due to appear at a briefing alongside Pompeo and Treasury Secretary Steven Mnuchin.