US President Donald Trump reversed his earlier decision to have Defence Secretary James “Mad Dog” Mattis remain in his post until February, and ordered him out of the Pentagon by the end of the year.

Deputy Defence Secretary Patrick Shanahan, 56, will take over the role. Mr Trump has lauded Shanahan’s achievements and described him as “very talented”.

– I am pleased to announce that our very talented Deputy Secretary of Defense, Patrick Shanahan, will assume the title of Acting Secretary of Defense starting January 1, 2019. Patrick has a long list of accomplishments while serving as Deputy, & previously Boeing. He will be great!, Trump wrote on Twitter.

Mattis resigned over Trump’s decision to withdraw the small US contingent in Syria. This gave the impression of the US abandoning the Kurds yet again, after Kurdish forces fought side by side with Americans against ISIS. Trump made the decision after a phone conversation with Turkish President Recep Tayyip Erdogan.

Gen Mattis, 68, strongly hinted at policy differences with Mr Trump when he resigned on Friday. After his testy letter to Trump was made public, the President decided to move forward his withdrawal and to order him out of the office.

Shanahan is a former Boeing executive and he joined the Pentagon recently, in July 2017, after President Trump nominated him. Originally from Washington state, Mr Shanahan studied mechanical engineering and business at the Massachusetts Institute of Technology and joined Boeing as an engineer in 1986.