Rex Tillerson made a statement Tuesday afternoon at the State Department about his abrupt firing as secretary of state earlier in the day.

Tillerson thanked his colleagues, US troops, and other federal agencies for their work, but not President Donald Trump.

The White House and those close to Tillerson have given conflicting accounts of the timing of his ouster.

The Associated Press reported that the White House chief of staff, John Kelly, told Tillerson on Friday that he should expect to see a presidential tweet about him sometime soon but did not give more details.

Tillerson's top aide said he was "unaware of the reason" for his firing and had not discussed it with Trump.

From the State Department briefing room on Tuesday afternoon, Rex Tillerson addressed his abrupt firing as secretary of state earlier in the day, mostly refusing to mention President Donald Trump.

Tillerson praised his colleagues, diplomats serving abroad, US troops, and the State Department's cooperation with other government agencies.

"The world needs selfless leaders like these, ready to work with long-standing allies, new emerging partners and allies who now are struggling as democracies and in some cases are dealing with human tragedy," he said.

However, Tillerson did not thank or praise Trump at any point in his address.

Tillerson said he would officially leave on March 31. He added that he hoped the State Department's policy planning team would remain in their positions and continue serving the country.

Trump announced in a tweet Tuesday morning that he was replacing Tillerson with CIA Director Mike Pompeo. The CIA's deputy director, Gina Haspel, will take over as the agency's head following Pompeo's departure.

The White House and those close to Tillerson have given conflicting accounts of the timing of his firing.

The White House said Tillerson was informed on Friday of his coming dismissal. The Associated Press reported on Tuesday that the White House chief of staff, John Kelly, called Tillerson on Friday and told him a presidential tweet about him may be coming but did not give details.

Meanwhile, Undersecretary of State Steve Goldstein said Tillerson was "unaware of the reason" for his firing and had not discussed it with Trump.

"The secretary had every intention of staying because of the critical progress made in national security," Goldstein said in a statement. "The secretary did not speak to the president 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."

The White House later fired Goldstein.

Tillerson touted some of the State Department's accomplishments during his tenure as the nation's chief diplomat, noting that some foreign-policy areas would require more effort.

Tillerson singled out China and Syria and "much work remains" in responding to Russia's "troubling behavior and actions."

"Russia must assess carefully as to how its actions are in the best interests of the Russian people and of the world more broadly," Tillerson said. "Continuing on their trajectory is likely to lead to greater isolation on their part."

Trump told reporters on the White House lawn on Tuesday morning that he did not discuss his decision with Tillerson but that the two had "talked about this for a long time."

"I didn't discuss it very much with him," Trump said. "I made that decision by myself."

Trump's frayed relationship with Tillerson has been well-documented. The president frequently complained to his West Wing advisers about Tillerson, and Tillerson once reportedly called Trump a "moron" behind his back.

On Monday, Tillerson publicly broke from the White House and said Russia was responsible for ordering a chemical attack this month against a former Russian spy living in the UK. The White House has called the attack "reckless, indiscriminate, and irresponsible" but declined to accuse Russia of perpetrating it.

Trump acknowledged Tuesday morning that Russia was most likely responsible for the attack.