Sir Kim Darroch has resigned as UK ambassador to the US, as a row over leaked emails critical of President Trump’s administration escalates.

Theresa May said Sir Kim’s departure was “a matter of deep regret” after the ambassador said it was “impossible” for him to continue.

Tory leadership candidate Boris Johnson has faced strong criticism for failing to fully support him.

President Trump said on Monday that the US would not deal with Sir Kim.

The US president had branded him “a very stupid guy” after confidential emails emerged where the ambassador had called his administration “clumsy and inept”.

In a letter to the Foreign Office, Sir Kim said he wanted to end speculation about his position: “The current situation is making it impossible for me to carry out my role as I would like.

His resignation has prompted widespread support for Sir Kim as well as criticism of Tory frontrunner Boris Johnson.

According to some Whitehall sources, Sir Kim decided to resign after Mr Johnson refused to support him during the Tory leadership debate on Tuesday night, said BBC diplomatic correspondent James Landale.

Mr Johnson was asked repeatedly by fellow leadership candidate Jeremy Hunt whether he would keep Sir Kim in post if he became prime minister, but refused to answer.

It is understood Mr Johnson spoke to Sir Kim on the phone on Wednesday afternoon.

Following Sir Kim’s resignation, Mr Johnson said he was “a superb diplomat” and whoever was responsible for the leak “has done a grave disservice to our civil servants”.

Asked why he was not more supportive of Sir Kim, he said it was “wrong to drag civil servants into the political arena”.

Europe Minister Sir Alan Duncan – who backs Mr Hunt in the leadership contest – said it was “contemptible negligence” of Mr Johnson not to support Sir Kim.

“He’s basically thrown this fantastic diplomat under a bus to serve his own personal interests,” he said.

However, Sir Michael Fallon – a supporter of Mr Johnson – told BBC Newsnight Sir Kim’s position became untenable “long before the debate on Tuesday night” and he understands the ambassador did not watch it.

The backlash against Mr Johnson was “a shabby attempt to politicise” the affair and the leadership contender had “made it clear he supports all our diplomats”, he said.