Rex Tillerson, the oil executive who served as President Trump's secretary of state until he was fired Tuesday, called for a "smooth transition" in leadership at the State Department in his first public remarks since learning President Trump fired him from the administration.

In a farewell at the State Department headquarters, the former Exxon chief, whose first foray into politics saw him frequently left in the dark by his boss, recounted successes in Syria, Afghanistan and other locations, and thanked his diplomatic corps.

"I'll now return to private life as a private citizen and a proud American," said Tillerson, who will stay on until March 31.

Trump on Tuesday unceremoniously fired Tillerson replaced him with CIA Director Mike Pompeo.

The president announced his ousting of Tillerson on Twitter. Tillerson was unaware of the reason for being fired when Trump went public with the news, a State Department spokesman said.

“Mike Pompeo, Director of the CIA, will become our new Secretary of State,” the president tweeted. “He will do a fantastic job! Thank you to Rex Tillerson for his service!”

Speaking to reporters before leaving for California, Trump acknowledged he and Tillerson have had disagreements. The president said he and Pompeo have a “similar thought process."

“We got along actually quite well, but we disagreed on things,” Trump said of Tillerson. “When you look at the Iran deal, I think it's terrible. I guess he felt it was okay…So we were not really thinking the same.”

Trump praised Pompeo for his “tremendous energy, tremendous intellect."

"We're always on the same wave length," he said. "The relationship has always been very good. That's what I need as secretary of state."

A senior White House official told Fox News the president decided to make the change ahead of his upcoming meeting with North Korean dictator Kim Jong Un.

“The president wanted to make sure to have his new team in place in advance of the upcoming talks with North Korea and various ongoing trade negotiations,” the adviser said.

Tillerson has not officially left the job. Once that happens, Deputy Secretary John Sullivan becomes acting secretary.

Tillerson, the former chief executive of ExxonMobil, was tapped as Trump’s first secretary of state. But the two clashed over foreign policy strategies over the last year.

A White House source told Fox News that chief of staff John Kelly called Tillerson Friday to tell him Trump wanted him to step aside. Tillerson, the source said, asked if Trump could wait for him to get back from his trip to Africa.

Tillerson returned to the United States on Tuesday morning, as Trump pulled the trigger on his firing.

Under Secretary Steve Goldstein said in a statement Tillerson did not speak to Trump before he was fired and was not sure why he was being dismissed.

"The secretary did not speak to the president this morning and is unaware of the reason, but he is grateful for the opportunity to serve, and still believes strongly that public service is a noble calling and not to be regretted," Goldstein said.

Several hours after that statement, Goldstein was fired from his job at the State Department, Fox News is told.

During his remarks Tuesday, Tillerson said he had a phone call with Trump and Kelly around noon-time from Air Force One, where they discussed the need for a “smooth transition.”

Tillerson touted his tenure at the State Department and his team for “exceeding expectations of almost everyone with the DPRK pressure campaign,” and noted that they “dramatically increased” the “scope” and “effectiveness” of sanctions on the rogue North Korean regime.

Tillerson also thanked the Department of Defense, and Secretary Jim Mattis, saying that “for the first time in most people’s memories,” the departments have a “close” relationship where “we all agree” that success and peace around the globe “starts with diplomacy.”

"The rewarding part of having leadership and partnerships in place is that you can actually get things done," Tillerson said.

Tillerson encouraged State Deparment officials to stay on with the administration and "continue our mission," noting the need for "accountability, which means treating each other with honesty and integrity" and "having respect for one another."

Pompeo is the first former CIA director to become secretary of state. Before joining the Trump administration, he was elected to Congress from Kansas.

“I am deeply grateful to President Trump for permitting me to serve as director of the Central Intelligence Agency and for this opportunity to serve as secretary of state," Pompeo said in a statement. "His leadership has made America safer and I look forward to representing him and the American people to the rest of the world to further America’s prosperity.”

Trump also said Tuesday he is naming Gina Haspel the new director of the CIA. Haspel has served as Pompeo’s deputy and will become the first woman to serve as director.

“I am grateful to President Trump for the opportunity, and humbled by his confidence in me, to be nominated to be the next Director of the Central Intelligence Agency,” Haspel said in a statement.

Republicans on Capitol Hill reacted warmly to the selections. Both Pompeo and Haspel face Senate confirmations. Pompeo was confirmed by the Senate for CIA director last year.

“Mike Pompeo is an outstanding selection as our next Secretary of State," Arkansas GOP Sen. Tom Cotton said. "Mike’s deep understanding of world affairs, his clear-eyed view of the threats to our national security, and his key relationships with world leaders make him an excellent choice to be our top diplomat.”

House Democratic Whip Steny Hoyer said Pompeo will have a “critical role to play in making clear to Russia that it cannot interfere in our elections without severe consequences.”

“I hope he recognizes the outstanding talent at our State Department and takes steps to stop the hollowing out of our career foreign service, which undermines our national security,” the Maryland Democrat said.

Fox News' Brooke Singman, John Roberts, Jennifer Bowman, Serafin Gomez, Chad Pergram, Lucas Tomlinson, and Rich Edson contributed to this report.