President Trump has removed Rex Tillerson as secretary of state and replaced him with current CIA Director Mike Pompeo, after months of speculation surrounding Tillerson's role in the Trump administration, a fact Tillerson only learned was official when the announcement was made on Tuesday morning.

Mr. Trump announced the news of Tillerson's ouster on Twitter, thanking him for his service. The Washington Post first reported news of Tillerson's firing, shortly before the president's tweet.

Mike Pompeo, Director of the CIA, will become our new Secretary of State. He will do a fantastic job! Thank you to Rex Tillerson for his service! Gina Haspel will become the new Director of the CIA, and the first woman so chosen. Congratulations to all! — Donald J. Trump (@realDonaldTrump) March 13, 2018

As Mr. Trump departed for a California trip Tuesday morning, he told reporters that he and Tillerson "disagree on things," and he singled out the Iran nuclear deal as an issue.

"Rex and I have been talking about this for a long time. We got along actually quite well, but we disagreed on things," he said. "When you look at the Iran deal -- I think it's terrible. I guess he thought it was OK. I wanted to either break it or do something. And he felt a little bit differently. So we were not really thinking the same."

News of Tillerson's departure from the State Department came as the secretary arrived in Washington early Tuesday morning after his overseas visit to Africa. There, he reaffirmed the U.S. -- Africa relationship in spite of alleged vulgar comments made by the president about immigrants from African nations in January.

Get Breaking News Delivered to Your Inbox

When did Rex Tillerson know?

According to a White House offficial, Chief of Staff John Kelly had phoned Tillerson on Friday to inform him of the president's decision. Tillerson and Kelly had then agreed that any announcement would be held until he returned from his trip to Africa. CBS News' Margaret Brennan reports that as a result of his call with Kelly, Tillerson had cancelled his scheduled public events in Nairobi and proceeded to cut his trip short to return to Washington.

News of his firing was reported by the Washington Post before the president tweeted the announcement that Pompeo would replace him. During remarks at the State Department, Tillerson told reporters that he received a call on Tuesday "a little after noon time" from the the president, as well as Kelly "to ensure we have clarity as to the days ahead."

Earlier, State Department Under Secretary Steve Goldstein said in a statement to CBS News on Tuesday morning,"The Secretary had every intention of staying because of the critical progress made in national security. He will miss his colleagues at the Department of State and the foreign ministers he has worked with throughout the world."

Goldstein added in his statement that Tillerson was "unaware of the reason" he had been removed but said he is "grateful for the opportunity to serve, and still believes strongly that public service is a noble calling." Just hours after Tillerson's ouster, Goldstein was later told by the White House that he too was no longer needed in his role at the State Department.

While in Africa, Tillerson was largely left out of major developments in North Korea as the White House announced it would be taking up talks with the regime sometime in May. Brennan reported that in fact, Tillerson had every intention of staying because of the critical progress in national security on North Korea.

"This is a level of discussion, this president is going to drive this effort, this negotiation, but it will take a team to build out the picture, so that we put the president in the best position so that he can achieve that outcome," Pompeo said Sunday.

Mr. Trump released a statement shortly before leaving for his trip to California saying he was "proud" to nominate Pompeo to replace Tillerson.

"His experience in the military, Congress, and as leader of the CIA have prepared him well for his new role and I urge his swift confirmation," said Mr. Trump in a statement. He added, " want to thank Rex Tillerson for his service. A great deal has been accomplished over the last fourteen months, and I wish him and his family well."

According to the White House, Gina Haspel, the Deputy Director of the CIA, will be nominated to replace Director Pompeo. If confirmed, she would become the CIA's first female director. She was only recently named deputy director.

Pompeo said in a statement of the president's decision, "If confirmed, I look forward to guiding the world's finest diplomatic corps in formulating and executing the President's foreign policy."

He added, "In my time as Director of the Central Intelligence Agency, I have worked alongside many remarkable Foreign Service officers and Department of State leaders serving here in the United States and on the very edge of freedom. I know I will learn from them and, as President Trump set out in his State of the Union Address, work hard to ensure that "our nation will forever be safe and strong and proud and mighty and free."