Trump has removed Secretary of State Rex Tillerson and replaced him with CIA Director Mike Pompeo, the president announced on Twitter Tuesday. That announcement, according to CNN, is also how Tillerson himself learned of his ousting.

Rex Tillerson found out he was fired by President Trump's tweet on Tuesday morning, according to Steve Goldstein, undersecretary for public diplomacy https://t.co/TYsY77tQUx pic.twitter.com/YME9uMvTXI — CNN (@CNN) March 13, 2018

The State Department has said in a statement that Tillerson “had every intention of staying” and that he “did not speak to the President and is unaware of the reason.” Speaking with reporters about his decision, Trump cited different ways of thinking and the Iran nuclear deal in particular.

The move makes for a major shakeup to Trump’s national security team at a time when the administration is in negotiations with North Korea about a possible meeting.

“I want to thank Rex Tillerson for his service,” Trump said in a statement. “A great deal has been accomplished over the last fourteen months, and I wish him and his family well.”

On Twitter, Trump announced Pompeo’s move to the State Department and said that Gina Haspel, the deputy director of the CIA, will replace Pompeo. If confirmed, she will be the first woman to run the agency.

“If confirmed, I look forward to guiding the world’s finest diplomatic corps in formulating and executing the President’s foreign policy,” Pompeo said in a statement.

According to the Post, the White House originally said Trump asked Tillerson to resign on Friday, and Tillerson cut his trip to Africa short and flew back to Washington on Monday. The State Department, and those familiar with Tillerson, said otherwise, insisting the two men did not speak. Trump has since said he did not speak with Tillerson “much.”

Pres. Trump, on consulting with Sec. of State Tillerson on decision to talk with North Korea: "I really didn't discuss it very much with him, honestly. Rex wasn't, as you know, in the country." https://t.co/aI2H7wZo00 pic.twitter.com/KwaUmcSsvI — ABC News (@ABC) March 13, 2018

Later on Tuesday the White House doubled down on the claim, saying John Kelly spoke with Tillerson on Friday and Saturday about his firing. In response, state department officials have said that Kelly called only to say there would be a tweet from the president concerning Tillerson. That call, they said, did not say what the subject of the tweet would be.

On Tuesday afternoon, the Associated Press reported that the White House fired the Tillerson aide who contradicted their account of Tillerson’s firing.

Others have also reported that the news of Tillerson’s firing came as a surprise.

We got off the plane with Tillerson less than four hours ago. There was zero indication on flight home that this was imminent. — Josh Lederman (@JoshNBCNews) March 13, 2018

Several senior Republican aides say they were given no heads up on Trump’s decision to fire Rex Tillerson: “Twitter. And news alerts, just like everyone else, apparently,” one senior GOP aide who works on foreign policy said when asked how the news spread https://t.co/KIOSD6Zd3p — CNN (@CNN) March 13, 2018

The tension between the president and Tillerson, who once allegedly called Trump a “fucking moron,” has simmered for months. Trump has said that Tillerson is too “establishment” in his handling of foreign affairs, and Tillerson has previously deviated from the official White House line. According to the White House, the change was made because of possible talks with North Korea and upcoming trade negotiations.