Jeremy Hunt has criticised Donald Trump for his attack on the UK ambassador Kim Darroch – and vowed to keep the top diplomat in post if he wins the race to No 10.

The foreign secretary broke ranks after No 10 – and Boris Johnson – refused to hit back at the US president directly, calling his comments “disrespectful and wrong”.

In a series of tweets directed at Mr Trump, Mr Hunt said: “Friends speak frankly so I will: these comments are disrespectful and wrong to our Prime Minister and my country.”

He went on: “Allies need to treat each other with respect as @theresa_may has always done with you. Ambassadors are appointed by the UK government and if I become PM our Ambassador stays.”

Mr Hunt’s comments came after Mr Trump launched an attack on Sir Kim and prime minister Theresa May over the course of two days.

Melania Trump wooden statue prompts complaints in Slovenia Show all 5 1 /5 Melania Trump wooden statue prompts complaints in Slovenia Melania Trump wooden statue prompts complaints in Slovenia A wooden statue of Melania Trump has been erected in the first lady’s home country of Slovenia REUTERS Melania Trump wooden statue prompts complaints in Slovenia The conceptual statue depicts Ms Trump standing in the blue outfit she wore to her husband’s inauguration REUTERS Melania Trump wooden statue prompts complaints in Slovenia The monument is set in the fields near the town of Sevnica REUTERS Melania Trump wooden statue prompts complaints in Slovenia Locals have complained that the wooden sculpture does not look like Ms Trump at all AFP/Getty Images Melania Trump wooden statue prompts complaints in Slovenia The statue was commissioned by US artist Brade Downey and created by artist Ales Zupevc AFP/Getty Images

In a string of posts on Twitter, the US president described Sir Kim as “wacky” and “pompous” and the prime minister’s conduct of Brexit as “foolish” and a “disaster”.

Mr Trump said British diplomat Sir Kim was “not liked or well thought of within the US”, and that the White House “will no longer deal with him”.

The president’s tirade was sparked by emails leaked on Sunday in which Sir Kim described Mr Trump’s administration as “inept” and “dysfunctional”.

Head of the diplomatic service Sir Simon McDonald will appear before MPs on Wednesday to give evidence to the Foreign Affairs Committee following the leaked emails.

MPs have also written to Theresa May, Jeremy Hunt and the Metropolitan Police calling for an investigation into the “serious criminal act”.

Mr Hunt and Boris Johnson, who are vying to succeed Theresa May as prime minister, will go head-to-head in a live TV debate for the first time on Tuesday.