President Donald Trump has announced that acting Secretary of Defence Patrick Shanahan is withdrawing his nomination to lead the Pentagon.

The abrupt announcement came in a tweet from the president, who said Mr Shanahan had done “a wonderful job” but would step aside to “devote more time to his family”.

The president added that the Secretary of the Army, Mark Esper, will be the new acting secretary.

“I know Mark, and have no doubt he will do a fantastic job!” President Trump said in a second tweet on the subject.

The post at the Pentagon has not been filled permanently since Gen James Mattis retired in January following policy differences with President Trump.

President Trump announced in May that he would nominate Mr Shanahan, but the formal nomination process in the Senate had been inexplicably delayed.

Mr Shanahan, a former Boeing executive, has been leading the Pentagon as acting secretary since January 1, a highly unusual arrangement for arguably the most sensitive Cabinet position.

In his tenure at the department, he has had to deal with a wide array of international hotspots, ranging from missile launches by North Korea to the sudden shift of military ships and aircraft to the Middle East to deal with potential threats from Iran.

Mr Shanahan, 56, had extensive of experience in the defence industry but little in government.

In more than four months as the acting secretary, he focused on implementing the national defence strategy that was developed during Mr Mattis’ tenure and emphasises a shift from the resources and tactics required to fight small wars against extremist groups to what Mr Shanahan calls “great power” competition with China and Russia.