Mattis, a retired Marine Corps general who was known as a stabilizing force in President Trump’s cabinet, will leave his job at the end of February, Trump said in a tweet on Thursday.
“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,” Trump tweeted.
Trump also announced he would nominate a successor to Mattis shortly.
Despite Trump’s talk of retirement, Mattis said in his resignation letter that he was stepping down so Trump could have a defence chief whose views align more closely with his own.
His departure had been anticipated since Trump announced on Wednesday that he was withdrawing US troops from Syria despite opposition from US allies and top US military officials.
Mattis joins a long list of former Trump administration senior figures who have either quit or been removed, some unceremoniously like Secretary of State Rex Tillerson who Trump fired via Twitter in March.
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.
Speculation that Mattis might not last long in his post grew in October when Trump said in a CBS interview that the general was “sort of a Democrat” and might be leaving.
During an interview with CBS, the president was asked if Mattis – with whom he has at times reportedly had a strained relationship – was going to leave.
“I don’t know. He hasn’t told me that,” he said. “I have a very good relationship with him. I had lunch with him two days ago. I have a very good relationship with him. It could be that he is. I think he’s sort of a Democrat, if you want to know the truth.”
He added, “General Mattis is a good guy. We get along very well. He may leave. I mean, at some point, everybody leaves. Everybody. People leave. That’s Washington.”
However, Trump said in the same interview there were some people in his administration he is “not thrilled with”.
Speculation intensified in September with the publication of Bob Woodward’s Fear: Trump in the White House, which claimed the former military officer had described Trump as an idiot and told colleagues the president “acted like – and had the understanding of – a fifth- or sixth-grader”.
Woodward quotes one scene in which the president reportedly told the defence secretary to “kill” Bashar al-Assad after the Syrian leader was accused of using chemical weapons in an alleged attack on civilians in April 2017.
The book said Mattis told the president that he would get right on it. But after hanging up the phone, he told an aide, “We’re not going to do any of that. We’re going to be much more measured.”