US Defence Secretary Jim Mattis (photo above) abruptly said he was quitting on Thursday after falling out with President Donald Trump over his foreign policies, one day after Trump rebuffed top advisers and decided to pull all US troops out of Syria.
Mattis announced plans to resign in a candid resignation letter to Trump that laid bare the growing divide between them, and implicitly criticised Trump's disregard for America's closest allies.
He released the letter after a face-to-face meeting with Trump in which the two men also aired their differences, a senior White House official said.
"Because you have a right to 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," Mattis said in the letter.
US officials said the resignation had not been forced by Trump.
Trump announced on Wednesday that US troops in Syria would be withdrawn, a decision that upended American policy in the region. On Thursday, officials said the president was considering defying Mattis again by ordering a substantial US pullout from the 17-year-long conflict in Afghanistan.
Mattis, a retired Marine general whose embrace of Nato and America's traditional alliances often put him at odds with Trump, had advised against the Syria withdrawal. One official said it was a contributing factor to his resignation.
The news is certain to shock US military allies, already bewildered by what they see as Trump's unpredictable, go-it-alone approach to global security, and raises questions about whether Mattis' successor will be as steadfast about traditional treaty commitments, including to Nato.
When Mattis interviewed with Trump for the job in 2016, he split with the president-elect on a host of issues, including on Nato and the use of torture. Trump ultimately deferred to Mattis, who opposed the latter, signalling that he could be persuaded by his advisers.
But as time grew, Trump increasingly acted on his own instincts on a host of national security issues, choosing an "America First" agenda that contradicted Mattis' core beliefs.
Mattis' letter indicated that he disagreed with Trump's isolationist policies, writing that it was his belief the United States needed to maintain strong alliances and show allies respect.
Trump has withdrawn the United States from several international agreements since taking office in January 2017.
The Mattis resignation letter also said that he believed the United States "must be resolute and unambiguous in our approach to those countries whose strategic interests are increasingly in tension with ours". He identified Russia and China as countries that "want to shape a world consistent with their authoritarian model".
The shifts in significant aspects of US foreign policy and Mattis' addition to the long list of senior Trump administration figures who have quit or been removed added to the sense of an increasingly unpredictable White House as Trump approaches the halfway point of his four-year term.
And if defence policy disagreements were not enough distraction for a president who is under investigation by a special counsel over Russian interference in the 2016 US election, financial markets took a beating this week and a US government shutdown loomed because of funding disputes over Trump's desire to build a wall on the US-Mexico border.
Trump, announcing Mattis' departure on Twitter, said he would nominate a successor soon.
"General Jim Mattis will be retiring, with distinction, at the end of February, after having served my administration as secretary of defence for the past two years," he said.
One possible candidate to replace Mattis as defence chief could be Republican Senator Tom Cotton, long considered a front-runner to eventually take the role.
Trump's White House has had the highest turnover of senior-level staff of the past five presidents, according to the Brookings Institution think tank.
Some departed unceremoniously, such as Trump's first secretary of state Rex Tillerson, whom Trump fired via Twitter in March.
Speculation that Mattis might not last long in his post grew in October when Republican Trump said in a CBS interview that the general was "sort of a Democrat" and might be leaving.
Mattis responded at the time by telling reporters that he had Trump's full support.
Stephen Miller, a senior White House adviser, said Trump was entitled to a Pentagon chief with whom he could agree.
"This is an opportunity for the whole country to get a new secretary of defence who will be aligned with the president on these critical issues, whether you're talking about in Syria, whether you're talking about across the Middle East in general," Miller told CNN.
Mattis had argued for maintaining a strong US military presence in Afghanistan to bolster diplomatic peace efforts.
US officials who spoke on condition of anonymity said thousands of the 14,000 troops in Afghanistan could be sent home.