Jeremy Hunt was responding to a broadside by Trump against both Theresa May's government and Kim Darroch.

British Foreign Secretary Jeremy Hunt on Tuesday said US President Donald Trump was "disrespectful and wrong" in making disparaging remarks about outgoing Prime Minister Theresa May and her ambassador to Washington.

Hunt, who is vying with his predecessor Boris Johnson to replace May in Downing Street later this month, added that he would keep US ambassador Kim Darroch in place if he took office.

"@realDonaldTrump friends speak frankly so I will: these comments are disrespectful and wrong to our prime minister and my country," he tweeted.

"Your diplomats give their private opinions to @SecPompeo and so do ours! You said the UK/US alliance was the greatest in history and I agree.

"But 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."

He was responding to a broadside by Trump against both May's government and Darroch, triggered by the leak of unflattering diplomatic cables written by the British envoy.

Trump said Darroch was a "very stupid guy" and slammed outgoing May's "foolish" Brexit policies on Tuesday in a second straight day of virulent attacks.

The missives threaten to plunge Washington and London into an unprecedented diplomatic crisis.

Hunt is trailing Johnson in the contest to replace May as leader of their Conservative party and prime minister of Britain.

She is stepping down after failing to deliver Britain's exit from the European Union, three years after the 2016 referendum vote for Brexit.

Earlier, Johnson said he had a good relationship with the Trump White House and noted that he himself had criticised May's Brexit strategy.

"I have got a good relationship with the White House and I have no embarrassment in saying that," he told reporters.

"I think it's very important that we have a strong relationship with our most important ally.

"The United States is, has been, will be and for the foreseeable future our number one political military friend."