Boris Johnson is facing a furious backlash after it emerged that Britain’s ambassador to the US quit because of the Conservative leadership frontrunner’s failure to support him over his leaked criticism of Donald Trump.

Sir Kim Darroch dramatically resigned on Wednesday after watching the previous night’s TV leadership debate in which Mr Johnson – the man widely expected to win and become PM – repeatedly declined to rule out replacing the diplomat.

The resignation came as Downing Street confirmed there had been “initial discussions” between government and police regarding the Whitehall investigation into the leak of dispatches in which Sir Kim painted a picture of an “inept” president and his chaotic administration.

The prime minister described the loss of the career diplomat and former national security adviser as a matter of “great regret”, and appeared to take a veiled swipe at her likely successor as she told MPs to reflect on the importance of “defending our values and principles, particularly when they are under pressure”.

Elsewhere there were direct attacks on Mr Johnson for his role in the affair.

Foreign Office minister Sir Alan Duncan described his behaviour as despicable, accusing him of having “thrown our ambassador under a bus”.

And the head of the FDA union of senior civil servants, Dave Penman, said Sir Kim had been placed in an “impossible situation” by the failure of Mr Johnson and those around him to offer their “unequivocal support”.

“Johnson and his allies have sent the clearest signal possible to Sir Kim, the diplomatic corps, the wider civil service and, unfortunately, to foreign governments that civil servants’ professional, impartial advice is needed, but they are ultimately expendable if it proves politically expedient,” he said.

Independent MP Nick Boles, who resigned from the Conservative Party earlier this year, said: “Boris Johnson isn’t even PM yet and he is already responsible for a grievous blow to the UK’s international reputation.”

Theresa May on Kim Darroch's resignation: 'It is a matter of great regret'

Former Tory chair Sir Patrick McLoughlin – a supporter of Mr Johnson’s leadership rival Jeremy Hunt – turned on the frontrunner: “It is unedifying to see someone who wants to be PM failing to stand up for hard-working civil servants, who have done nothing wrong, under attack from foreign governments. Leadership involves standing up for your team.”

And few doubted that the chair of the Commons Foreign Affairs Committee, Tory MP Tom Tugendhat, had Mr Johnson in mind when he said: “Leaders stand up for their men. They encourage them to try and defend them when they fail.”

There was a show of support for Sir Kim at the Foreign Office, where the head of the diplomatic service, Sir Simon McDonald, said that more staff attended a meeting to express solidarity with him than he had seen in his time in the post.

Sir Alan Duncan called on Theresa May to urgently appoint the next US ambassador in order to take the decision out of Mr Johnson’s hands.

But Downing Street declined to reveal whether a new envoy would be named before the PM’s departure on 24 July, saying only that an appointment would be made “in due course”.

Sir Kim told the PM of his decision to cut short his posting, which had been due to expire at the end of the year, in a five-minute phone call shortly before prime minister’s questions in the Commons.

And in a statement released shortly afterwards by the Foreign Office, he said: “Since the leak of official documents from this embassy, there has been a great deal of speculation surrounding my position and the duration of my remaining term as ambassador.

“I want to put an end to that speculation. The current situation is making it impossible for me to carry out my role as I would like.”

Sir Kim was bullied out of his job, Labour claims (Getty)

Mr Johnson himself said he regretted the departure of “a superb diplomat” who he had worked with over many years.

Speaking during a campaign visit to a London pub, he blamed whoever was responsible for the leak of the “diptels” – diplomatic telegrams – saying they should be “run down, caught and eviscerated”.

“It is not right that civil servants’ careers and prospects should be dragged into the political agenda,” said the former foreign secretary.

Mr Hunt, who had pledged in the TV debate to keep Sir Kim on in Washington if he became PM, paid tribute to him for serving his country “with the utmost dedication and distinction”.

Anthony Gardner, a former US ambassador to the EU, said Sir Kim had fallen victim to those who saw Brexit as a “religious war” and regarded him as an agent of Remain.

“The real news about the Kim Darroch saga is not even the unacceptable comments from Trump but the effort of insiders to remove a senior civil servant who favours Remain,” he said.

“We are truly living during a religious war. Decency goes out the window.”

Boris Johnson 'regrets' Sir Kim Darroch's decision to resign

In contrast, Brexit Party leader Nigel Farage – an enthusiastic cheerleader for Donald Trump – hailed his departure as the “right decision”.

“Time [to] put in a non-Remainer who wants a trade deal with America,” he tweeted.

Jeremy Corbyn said that Mr Johnson’s refusal to support Sir Kim showed that he would not stand up to President Trump or stand up for Britain as prime minister.

“Johnson wants a sweetheart trade deal with Trump that would open our NHS to US corporate takeover,” said the Labour leader. “I’ll never let another country’s leader choose who represents the UK.”

And Emily Thornberry, Labour’s shadow foreign secretary, said: “The fact that Sir Kim has been bullied out of his job, because of Donald Trump’s tantrums and Boris Johnson’s pathetic lick-spittle response, is something that shames our country. It makes a laughing stock out of our government, and tells every one of Britain’s brilliant representatives abroad that the next Tory prime minister will not stand up for them, even when they are simply telling the truth and doing their job.