US defence secretary Jim Mattis is stepping down from his post, President Donald Trump has announced.
It comes after Mr Trump overruled his advice against pulling troops out of Syria and pressed forward on discussions to withdraw forces from Afghanistan.
Mr Mattis will leave by the end of February after two tumultuous years struggling to soften and moderate the president’s hardline and sometimes sharply changing policies.
He told Mr Trump in a letter that he was leaving because “you have a right to have a secretary of defence whose views are better aligned with yours”.
Mr Trump said in a tweet the defence secretary was retiring.
The announcement came a day after Mr Trump surprised US allies and members of Congress by announcing the withdrawal of all troops from Syria, while he continues to consider shrinking the American deployment in Afghanistan.
Mr Trump’s decision to pull troops out of Syria has been sharply criticised for abandoning America’s Kurdish allies, who may well face a Turkish assault once US troops leave, and had been staunchly opposed by the Pentagon.
Mr Mattis, in his resignation letter, emphasised the importance of standing up for US allies.
“While the US remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies,” Mr Mattis wrote.
His departure was quickly lamented by foreign policy hands on both sides of the aisle.
Last year, Republican senator Bob Corker – a frequent critic of the president – said Mr Mattis, along with White House chief of staff John Kelly and then-secretary of state Rex Tillerson, were helping “separate our country from chaos.”
Mr Tillerson was fired early this year and Mr Kelly is to leave the White House in the coming days.
“This is scary,” Senate intelligence committee vice-chairman Mark Warner said on Twitter.
“Secretary Mattis has been an island of stability amidst the chaos of the Trump administration.”
Mr Mattis’s departure has long been rumoured but officials close to him had insisted the battle-hardened, retired marine would hang on.
A White House official said Mr Mattis informed Mr Trump of his decision to leave the administration on Thursday afternoon.
Mr Trump said a replacement would be chosen soon.
At the start of the Trump administration, the president had gushed about his respect for Mr Mattis, repeatedly calling him “Mad Dog”, despite Mr Mattis’s own public insistence that the moniker was never his.
Instead, his nickname for years was CHAOS, which stood for “Colonel Has An Outstanding Suggestion,” and reflected Mattis’ more cerebral nature.
The two quickly clashed on major policy decisions.
During his first conversations with Mr Trump about the Pentagon job, Mr Mattis made it clear he disagreed with his new boss in two areas.
He said torture does not work, despite Mr Trumps assertion during the campaign that it did, and he voiced staunch support for traditional US international alliances, including Nato, which the president repeatedly criticised.