President Donald Trump has ousted his secretary of state, Rex Tillerson.

There had been reports for months of tension between Tillerson and Trump; the president cited some differences of opinion Tuesday.

President Donald Trump has asked Secretary of State Rex Tillerson to leave his post, choosing CIA Director Mike Pompeo to replace him, the White House said Tuesday.

The CIA's deputy director, Gina Haspel, will succeed Pompeo, becoming the first woman to lead the agency pending Senate confirmation for both her and Pompeo.

According to The Washington Post, which first reported the news, Trump on Friday asked Tillerson to step down.

"Mike Pompeo, Director of the CIA, will become our new Secretary of State," the president tweeted Tuesday. "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!"

Tillerson was on a diplomatic trip in Africa, which he cut short to return to Washington on Monday. Josh Lederman, a reporter for the Associated Press, tweeted that he had been on the plane back to the US with Tillerson and that there was "zero indication" that the firing was imminent.

The firing came a day after Tillerson publicly criticized Russian President Vladimir Putin, calling the Kremlin "an irresponsible force of instability in the world" following a nerve-agent attack in England that the UK blamed on Russia.

For months, reports had indicated there was tension between Tillerson and Trump, with Tillerson repeatedly denying he was leaving his job.

Pompeo released a statement Tuesday thanking Trump.

"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," he said. "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 cites difference of opinion on Iran nuclear deal

In comments to reporters on Tuesday morning before he took off for a trip to California, Trump said he had disagreed with Tillerson on a few issues, specifically the Iran nuclear deal.

"When you look at the Iran deal, I thought it was terrible," Trump said. "He thought it was OK. I wanted to either break it or do something — he felt a little differently."

Trump said he and Tillerson got along "quite well" but that they simply "disagreed on things."

He also praised Pompeo, saying that Pompeo had "tremendous energy, tremendous intellect," and that the two were "always on the same wavelength."

This article has been updated.