Rex Tillerson is out as secretary of state. President Donald Trump tweeted this morning that he’s naming CIA director Mike Pompeo to replace Tillerson.

Pompeo is to be replaced at the CIA by Gina Haspel, Pompeo’s deputy at CIA. She would be the first woman in that role.

Tillerson had just returned from a shortened trip to Africa hours before Trump’s announcement. Trump offered no explanation for the change, but the Washington Post reported that Trump asked Tillerson to step aside Friday, and the embattled diplomat cut short his trip to Africa on Monday to return to Washington.

An aide for Tillerson told the Associated Press that Trump hadn’t told the secretary of state why he was being fired. Tillerson wanted to stay, the aide said.

A White House official said Trump wanted to have a new team in place ahead of upcoming talks with North Korea and various trade talks. The official spoke on condition of anonymity because the official was not authorized to speak publicly.

There had been longstanding rumors throughout most of Tillerson’s tenure of friction between Trump and his secretary of state, a former Exxon Mobile Corp. CEO and a native of Wichita Falls.

In a statement to The Post, Trump listed Pompeo’s and Haspel’s achievements.

“I am proud to nominate the Director of the Central Intelligence Agency, Mike Pompeo, to be our new Secretary of State,” Trump said. “Mike graduated first in his class at West Point, served with distinction in the U.S. Army, and graduated with Honors from Harvard Law School. He went on to serve in the U.S. House of Representatives with a proven record of working across the aisle.”

Of Haspel, Trump said, “Gina Haspel, the Deputy Director of the CIA, will be nominated to replace Director Pompeo and she will be the CIA’s first-ever female director, a historic milestone. Mike and Gina have worked together for more than a year, and have developed a great mutual respect.”

Tillerson has been out of favor with Trump for months, but had resisted efforts to push him out and vowed to remain on the job.

But his distance from Trump’s inner circle was clear last week when the president accepted an invitation to meet with Kim Jong Un, the North Korean leader, to the surprise of Tillerson, who was traveling in Africa at the time.

“I 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,” Trump said in his statement.

The Associated Press, The New York Times and The Washington Post contributed to this report.