President Donald Trump ousted U.S. Secretary of State Rex Tillerson on Tuesday, ending a rocky tenure in an abrupt move that stunned the former Exxon Mobil CEO and set in motion a shakeup of the administration’s foreign policy team.

Trump announced Tillerson’s ouster in a tweet shortly before 9 a.m. after weeks of staff turmoil, saying he would nominate CIA Director Mike Pompeo as secretary of state. But it was several hours before Trump discussed his decision with Tillerson, who said he’ll hand over all responsibilities to Deputy Secretary John Sullivan at midnight Tuesday.

In a farewell statement, Tillerson said the president called him “a little after noon time” from Air Force One en route to California. The top U.S. diplomat didn’t thank Trump or praise his leadership in his public comments, instead singling out the work of his State Department colleagues on high-profile issues including North Korea and counterterrorism.

The president’s move comes as his administration is preparing for high-stakes and historic talks between Trump and North Korean leader Kim Jong Un. Trump told reporters at the White House on Tuesday that he and Tillerson had disagreements over key issues including the Iran nuclear deal. Tillerson, Trump said, “had a different mindset. I think Rex is much happier now.”

Trump lauded Pompeo after the announcement, saying that as CIA chief, he had “earned the praise of members in both parties by strengthening our intelligence gathering, modernizing our defensive and offensive capabilities, and building close ties with our friends and allies in the international intelligence community.”

Deputy CIA Director Gina Haspel would succeed Pompeo, becoming the first woman to lead the agency, Trump said. Haspel is a career spy with more than three decades’ experience at the agency who ran a secret prison in Thailand where detainees were tortured in the early 2000s.

Tillerson, 65, took a middle-of-the-night phone call from White House chief of staff John Kelly on Friday during his Africa trip, telling him that the president was planning to replace him, according to two officials. He then spent the weekend fighting for his job between stops in Africa. Still, a top State Department official said Tillerson was blindsided by Trump’s telling the world he was ousted in a tweet.

“He had no idea that this was occurring,” said Steve Goldstein, Tillerson’s undersecretary of state for public diplomacy and public affairs, who was fired by the White House hours later. “He did not know.”

With his voice appearing to break, Tillerson said that after handing over all responsibilities to Sullivan, he’ll officially step down as secretary of state on March 31. He’ll spend the coming weeks assisting with the transition and he encouraged his top aides to stay on until that process is finished.

The dismissal follows a wave of departures and turmoil in Trump’s inner circle. The president’s top economic adviser Gary Cohn announced plans to leave earlier this month, joining former communications director Hope Hicks. Staff secretary Rob Porter was fired after allegations of domestic abuse.

Maine’s U.S. senators, Republican Susan Collins and independent Angus King, voted to confirm Tillerson and Pompeo in their original roles. King said in a statement that while he backed Pompeo then, secretary of state is “a different job” and that he has “concerns” with Haspel’s role in the CIA’s rendition program.

In a Tuesday statement, Collins said Tillerson “served his country honorably” and that Pompeo is “well aware” of the “pressing challenges” the U.S. faces abroad, including Russia and North Korea.

Rep. Chellie Pingree, a Democrat from Maine’s 1st District, faintly praised Tillerson for being “a grown-up” in the Cabinet and called it “disappointing” that Trump has fired high-ranking officials in “the most demoralizing ways possible.” Rep. Bruce Poliquin, a Republican from the 2nd District, wished Pompeo luck in a statement.

Trump, in his Tuesday announcement, signaled that Pompeo would bring the skills needed to confront the changing foreign policy challenges facing his administration. The 54-year-old former congressman from Kansas has grown close to Trump by delivering the president’s daily intelligence briefing almost every day since taking office in January 2017.

The Senate Foreign Relations Committee will hold a confirmation hearing on Pompeo’s nomination in April, according to Chairman Bob Corker, R-Tennessee. Haspel’s nomination also would need Senate approval.

Hired for his business acumen and outsider’s attitude, Tillerson, had initially earned Trump’s praise as a deal-maker in the president’s mold who would champion his “America First” policy to the world. But after an early honeymoon with Trump, he appeared unable to maintain a bond with the president.

The two repeatedly, and publicly, disagreed — on whether to stay in the Paris climate change accord, on how aggressively to back the embargo against Qatar led by Saudi Arabia and on whether to pursue a diplomatic solution to North Korea’s nuclear weapons program.

Tillerson also grew increasingly alarmed by what he saw as secret talks between Jared Kushner, Trump’s son-in-law and senior adviser, and Saudi Arabian Crown Prince Mohammed bin Salman — fearful that the discussions could backfire and tip the region into chaos, according to people familiar with Tillerson’s concerns.

Speculation that Tillerson was on his way out — so frequent that it was nicknamed “Rexit” — escalated in October, when NBC News reported that Tillerson had referred to Trump in private as a “moron.” Tillerson scoffed at the report, although he left it to his spokeswoman to deny he’d used the word.

In December, Tillerson dismissed as “laughable” a report of a plan at the White House to replace him with Pompeo. Trump joined in with a Twitter denial that only underscored their policy disputes, saying that the president calls the “final shots” and the speculation was “FAKE NEWS!”

BDN writer Michael Shepherd and Bloomberg writers Toluse Olorunnipa, Nafeesa Syeed, Jennifer Jacobs and Jennifer Epstein contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.