"Rex and I have been talking about this for a long time. We got along actually quite well, but we disagreed on things," the president said as he left for California. "When you look at the Iran deal, I think it's terrible, I guess he thought it was OK. … So we were not really thinking the same. With Mike Pompeo, we have a very similar thought process. I think it's going to go very well." In a statement, Trump said he is confident Pompeo "is the right person for the job at this critical juncture." The Army veteran and former congressman will "continue our program of restoring America's standing in the world, strengthening our alliances, confronting our adversaries, and seeking the denuclearization of the Korean Peninsula," the president said. If confirmed by the Senate, Pompeo would take on Tillerson's tough task of coordinating policy with an often unpredictable president. Senate Foreign Relations Committee Chairman Sen. Bob Corker, R-Tenn., said he plans to hold Pompeo's confirmation hearing next month. Tillerson's departure was widely expected for months, but he reportedly wanted to serve a full year. It is unclear what the secretary of State's exit means for other top Cabinet officials. Tillerson, Defense Secretary James Mattis and Treasury Secretary Steven Mnuchin reportedly forged a "suicide pact" in which the others would resign if Trump tried to remove one of them.

U.S. Secretary of State Rex Tillerson arrives at Djibouti–Ambouli International Airport in Djibouti, March 9, 2018. Jonathan Ernst | Reuters

Since Tillerson took the post in February 2017, mixed messages repeatedly came out of the White House and a State Department with diminishing relevance. The intramural clashes between the president and secretary of State came amid major international crises, including a potential nuclear showdown with North Korea. Trump confirmed on Tuesday he did not consult with Tillerson when making last week's decision to meet with North Korea's Kim Jong Un. The secretary of State canceled scheduled events in Kenya on Saturday, and at the time the State Department said he was not feeling well. Then, he diverged from the White House this week in saying poison used on a former spy in the United Kingdom "came from Russia." Tensions between the president and his top diplomat hit one high when Tillerson, 65, publicly distanced himself from the president's defiant response to violence at the white supremacist rally in Charlottesville, Virginia, last year. But there were numerous other clashes. The policy rift emerged most sharply when Trump tweeted in October that Tillerson is "wasting his time" trying to negotiate with North Korea to end its nuclear and missile programs. The president wrote: "Save your energy, Rex, we'll do what has to be done!" In October, NBC News reported that Tillerson already came close to resigning last summer but was urged to stay in the job until the end of the year. He referred to Trump as a "moron" in July following a meeting with the president's national security team, according to NBC, which cited multiple high-level administration sources. Tillerson never denied using "moron" to describe the president. Tillerson was among Trump's deputies who tried to prevent the president from pulling the United States out of the Paris climate agreement and taking steps to scrap the Iran nuclear deal. In an early clash, Trump criticized Qatar as "a funder of terrorism" in June about an hour after Tillerson urged Gulf states to ease a blockade against the tiny monarchy. — CNBC's Tom DiChristopher contributed to this report.

WATCH: Administration in shaky moment with Tillerson firing