London CNN  — 

Britain’s ambassador to the United States, Kim Darroch, has resigned after a series of leaked diplomatic cables revealed he had told 10 Downing Street that the Trump administration was “inept” and “clumsy.”

The resignation, announced by the UK Foreign Office on Wednesday, came after US President Donald Trump said Monday that the White House would no longer deal with Darroch.

The ambassador made his decision to step down after seeing that Boris Johnson, the current frontrunner to replace Theresa May as British Prime Minister, had refused to support him during Tuesday night’s leadership debate, a British government official confirmed to CNN.

CNN has reached out to sources close to Darroch for comment, but has not had a response.

Foreign Office minister Alan Duncan told the BBC on Wednesday that Johnson had thrown the former ambassador “under the bus” by refusing to back him.

Boris Johnson and Jeremy Hunt participated in a Conservative Leadership televised debate on Wednesday night.

In a letter to Simon McDonald, the permanent under secretary at the Foreign and Commonwealth Office, Darroch said he wanted to “put an end to speculation” about his position and the remainder of his term as ambassador.

“The current situation is making it impossible for me to carry out my role as I would like,” he wrote. “Although my posting is not due to end until the end of this year, I believe in the current circumstances the responsible course is to allow the appointment of a new ambassador.”

In the cables, leaked to the Daily Mail newspaper, Darroch warned the UK government that Trump’s “career could end in disgrace,” and described conflicts within the White House as “knife fights.”

Darroch’s resignation accepted with ‘regret’

UK Prime Minister Theresa May said Wednesday it was a “matter of great regret” that Darroch had felt it necessary to resign and that the government owed him an “enormous debt of gratitude.”

“Good government depends on public servants being able to give full and frank advice,” May told the House of Commons during Prime Minister’s Questions.

“I want all our public servants to have the confidence to be able to do that. And I hope the house will reflect on the importance of defending our values and principles — particularly when they are under pressure.”

In response to Darroch’s letter, McDonald said he accepted the ambassador’s resignation “with deep personal regret.”

“Over the last few difficult days you have behaved as you have always behaved over a long and distinguished career, with dignity, professionalism and class,” McDonald wrote. “The Prime Minister, Foreign Secretary and whole of the public service have stood with you: you were the target of a malicious leak; you were simply doing your job.”

British officials spent the weekend in damage control mode after the messages were leaked, as their White House counterparts downplayed Darroch’s comments.

Speaking after Darroch’s resignation, Johnson said he hoped whoever had leaked the cables “is run down, caught and eviscerated.”

“It is not right that advice to ministers – that civil servants must be able to make in a spirit of freedom – should be leaked,” Johnson told Sky News.

Meanwhile shadow Foreign Secretary Emily Thornberry from the UK’s main opposition party said Trump’s “tantrums” and Johnson’s “pathetic lick-spittle response,” is something that “shames our country.”