US Defence Secretary Jim Mattis has submitted a letter of resignation from the Trump administration.
Mr Trump tweeted the news on Thursday, saying the general will retire “with distinction” at the end of February.
It came one day after the president’s controversial announcement that US troops would be withdrawn from Syria.
In his letter, General Mattis strongly hinted his departure was caused by policy differences he had with Mr Trump.
A number of senior members of the president’s own Republican party have greeted the news of Gen Mattis’ resignation with concern.
Senate Majority Leader Mitch McConnell said he was “distressed” the departure was reportedly due to “sharp differences” that Gen Mattis had with the president.
Mr Trump has not immediately named a successor for the role, but said one would be appointed shortly.
- White House revolving door: Who’s gone?
- Trump rewrites US Syria policy
The defence secretary’s departure is the latest in a long line of resignations and firings since Mr Trump’s administration took office.
What did the resignation letter say?
As he resigned, Gen Mattis alluded to disagreements with the president in a number of policy areas.
In the letter, addressed to Mr Trump directly, he described his views on “treating allies with respect” and using “all the tools of American power to provide for the common defence”.
“Because you have the right to have a Secretary of Defense whose views are better aligned with yours on these and other subjects, I believe it is right for me to step down from my position,” he wrote.
While not mentioning the Syria troop pull-out directly, Gen Mattis had previously warned that an early withdrawal from the country would be a “strategic blunder”.
He also appeared to point to differences on a number of other key issues, like Russia and Nato.
“My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues,” Gen Mattis wrote in his letter.
He also confirmed he would continue in the role until the end of February to “allow sufficient time for a successor to be nominated and confirmed”.
A protest resignation, plain and simple
Analysis by Anthony Zurcher in Washington
Donald Trump may try to spin James Mattis’ departure as a retirement after a lifetime of government service. It’s not. This is a protest resignation, plain and simple.
The defence secretary’s letter to the president – in which he offers full-throated support for a US network of alliances and calls for a policy of containment of authoritarian rivals – makes that perfectly clear.
The timing of this announcement, just a day after Mr Trump abruptly ordered the withdrawal of US troops from Syria and amid rumours of an Afghanistan pullout, should also dispel any doubt about stark policy differences between the two men.
Gen Mattis had positioned himself as one of the cooler heads throughout the president’s term – considered by Democrats and Republicans alike as a “grown-up” in the room and a far cry from the “Mad Dog Mattis” nickname that so enamoured Mr Trump.
From his Pentagon office across the Potomac River from the White House, he managed to stay largely above the fray, frequently assuaging the concerns of US allies unnerved by some of the president’s more intemperate statements.
Now that check on the president, one of the last few remaining, is heading out, suggesting turbulent waters ahead.
What has the response been?
Members of congress from both side of the political divide have reacted with shock to the resignation.
Florida Senator Marco Rubio, who ran against Mr Trump for the Republican nomination in 2016, said the letter “makes it abundantly clear that we are headed towards a series of grave policy errors which will endanger our nation, damage our alliances & empower our adversaries”.
Mr McConnell, the Republican’s Senate leader, issued his own statement responding to the shock announcement.
John Kasich, Ohio’s Republican governor, described current events surrounding the Trump administration as “chaos”.
Democratic Senator Mark Warner, who is vice chair of the Senate Intelligence Committee, labelled the development “scary”.
He described Gen Mattis as “an island of stability amidst the chaos of the Trump administration”.
House Minority Leader Nancy Pelosi told US media she was “sad” and “shaken” by the news.
She also described Gen Mattis as a “comfort to many of us as a voice of stability in the Trump administration.”
What is the latest on withdrawals?
Mr Trump announced his decision to withdraw some 2,000 US troops from Syria on Wednesday, asserting that the Islamic State (IS) group had been defeated there.
The move is reportedly at odds with the view of some of his key cabinet officials.
It has also drawn criticism domestically and from some of the country’s international allies.
Separately on Thursday, there were reports the White House was also planning a sharp cut to troop numbers in Afghanistan.
The reports, which suggest 7,000 could return home, have not been confirmed by officials.
Republican Senator Lindsey Graham tweeted that any withdrawal of troops there would be a “high risk strategy” which could reverse US progress in the region.