US President Donald Trump has criticised departing Defense Secretary James Mattis and his view of alliances, saying the Pentagon chief failed to recognise the true costs of America's military support around the world.
A day after Trump announced he would replace Mattis two months earlier than expected, the president took a parting shot at the Pentagon chief, who resigned last week over policy differences with Trump.
"We are substantially subsidising the Militaries of many VERY rich countries all over the world, while at the same time these countries take total advantage of the US, and our TAXPAYERS, on Trade," Trump wrote in a series of tweets.
"General Mattis did not see this as a problem. I DO, and it is being fixed!" he wrote.
Administration officials said Trump was annoyed by Mattis' resignation letter, which included an implicit criticism of Trump's disregard for allies.
Despite the falling out, the Pentagon said on Monday that Mattis authorised Trump's withdrawal of US forces from Syria, one of the decisions that helped trigger his resignation.
The exit of Mattis, highly regarded by Republicans and Democrats alike, added to concerns over what many see as Trump's unpredictable, go-it-alone approach to global security.
"To those few Senators who think I don't like or appreciate being allied with other countries, they are wrong, I DO," Trump also tweeted.
"What I don't like, however, is when many of these same countries take advantage of their friendship with the United States."
"AMERICA IS RESPECTED AGAIN!" Trump added.
Mattis has been seen in Europe as firmly committed to the North Atlantic Treaty Organisation military alliance, while Trump warned European allies that the US could withdraw its support unless they boost defence spending.
Trump also tweeted on Monday that Saudi Arabia had agreed "to spend the necessary money needed to help rebuild Syria, instead of the United States".
It was not immediately clear whether Trump was referring to new funding from Saudi Arabia, which has already pledged money to cover costs for the next two years of stabilising areas of Syria retaken from the Islamic State militant group.
Trump made the decision last week to withdraw US forces from Syria and pull out about half of the 14,000 US troops in Afghanistan, against the advice of his top aides and US commanders. The move brought withering criticism from fellow Republicans, Democrats and international allies.
Defence officials have cautioned against a timeline, but the withdrawal could begin in weeks. A senior official said a specific plan was being worked out.
Mattis' abrupt resignation sparked concern among allies, who credit the retired Marine general with building trust and tempering isolationist impulses.