James Mattis is to step down as defence secretary, leaving the White House in protest at Donald Trump’s policies.
Mr Trump announced on Thursday night that the 68-year-old – one of the most widely-respected figures in the administration – was retiring at the end of February.
But in his resignation letter Mr Mattis said he could no longer support the president’s decisions.
"Because you have the right to have a secretary of defence 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 said.
In particular, Mr Mattis is said to disagree with Mr Trump’s decision, announced the previous day, to withdraw troops from Syria – a decision he was reportedly not consulted on. It was reported on Thursday evening that Mr Trump was also considering withdrawing all US troops – currently 14,000 – from Afghanistan.
Mr Trump made the announcement of Mr Mattis’s departure via Twitter, praising his service, and saying Mr Mattis was retiring.
Yet the four-star general, in his resignation letter, made clear that he was not retiring but rather resigning, because he did not agree with the president’s decisions.
In particular, Mr Mattis stressed that he disagreed with Mr Trump’s attitude towards international relations, and the importance of alliances.
“One core belief I have always held is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships,” he wrote.
“We cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those strong allies.”
He pointed out that Nato came to US aid after the September 11 attacks, and noted that the 74-nation coalition to defeat the Islamic State in Iraq and the Levant (Isil) was further evidence of the value of multilateralism.
"Similarly I believe we must be resolute and unambiguous in our approach to those countries whose strategic interests are increasingly in tension with ours," he added, singling out Russia and China as adversaries.
“We must do everything possible to advance an international order that is most conducive to our security, prosperity and values, and we are strengthened in this effort by the solidarity of our alliances.”
Mr Mattis resigned after a meeting on Thursday afternoon in which he had “a difference of opinion” with the president, Reuters reported.
The defence secretary was said to be particularly concerned about what would happen to the Kurds, were the US to withdraw its troops from Syria.
The retired general insisted it was not a “forced resignation”, and said he will step down on February 28, to allow time for a smooth transition before the Chairman of the Joint Chief of Staff steps down in September.
However, the decision of the 40-year military veteran is widely seen as a significant blow to the Trump administration. David Chalian, CNN political director, said: “There are no more grown-ups left in the room.”
Nancy Pelosi, the Democrat leader in the House, said she was "shocked" and "shaken" by his decision, given that he was a "devoted patriot".
"I’m shaken by what it means for our country," she said, urging all Americans to read his letter "and examine what it means".
"There’s something very wrong with this picture," she said. "Our troops look to Secretary Mattis as a leader. This is very serious to our country."
Chuck Schumer, the Democrat leader in the Senate, added: "Secretary Mattis was one of the few symbols of strength and stability in this organisation. Everything that represents stability is leaving. I’m sure most Americans feel it’s a great loss."
He said it "gives America less and less faith in this president as a leader."