The UK's Ambassador to the United States, Sir Kim Darroch, has resigned his post after being attacked by President Donald Trump over confidential diplomatic cables leaked to a Sunday newspaper.
Sir Kim Darroch was branded "wacky" and a "stupid guy" by Donald Trump, who said the US government would no longer deal with the UK's man in Washington after cables were published describing the US administration as "inept" and "dysfunctional".
Mr Darroch, who has worked in the diplomatic service for almost 40 years, said it had become "impossible" to perform his duties and would resign ahead of his planned retirement to end "speculation" over his role.
At Prime Minister's Questions, Theresa May said the ambassador's resignation was "a matter of deep regret". The Prime Minister spoke with Mr Darroch by phone for around five minutes, shortly before facing MPs. A member of her inner circle said Mrs May was "furious" about his resignation.
READ MORE: Opinion: How Donald Trump benefits from leak of Ambassador's comments
Addressing MPs, Mrs May added that "good government depends on public servants being able to give full and frank advice" and stressed the importance of "defending our values and principles particularly when they are under pressure".
Diplomatic sources were quoted in the media saying that Mr Darroch decided to resign after watching Boris Johnson, the front runner to become the next Prime Minister, fail to give his unequivocal backing to the ambassador in a televised debate between the two leadership candidates on Tuesday night.
Mr Johnson was repeatedly asked if he would keep Mr Darroch in his post until the end of his tenure, which runs until Christmas, but refused to answer.
Jeremy Hunt, the Foreign Secretary and Mr Johnson's rival for the leadership, said in a statement: "l am deeply saddened by Sir Kim Darroch's decision to resign as Her Majesty's Ambassador in Washington. For 42 years, Sir Kim served his country with the utmost dedication and distinction.
Mr Hunt added: "I am outraged that a selection of his reports should have been leaked. l am sure that our Ambassadors worldwide will continue to provide the objective and rigorous reporting that the Foreign and Commonwealth Office has always prized.
"I profoundly regret how this episode has led Sir Kim to decide to resign. He deserves to look back upon his career as a servant of Britain with the greatest satisfaction and pride."
Mr Johnson also expressed his regret, paying tribute to Sir Kim as a "superb diplomat" who he had worked with for many years.
"I think whoever leaked his diptels [diplomatic telegrams] really has done a grave disservice to our civil servants, to people who give impartial advice to ministers," he said.
"I hope that whoever it is, is run down, caught and eviscerated, quite frankly, because it is not right that advice to ministers that civil servants must be able to make in a spirit of freedom should be leaked."
But critics rounded on Mr Johnson over his reluctance to give full backing to the ambassador, with Foreign Office minister Sir Alan Duncan accusing the former Foreign Secretary of having "thrown our top diplomat under a bus" for his own personal interests.
"Boris Johnson - a former foreign secretary and he hopes to be the future prime minister - has basically thrown our top diplomat under the bus," he told the BBC. "There are a lot of people in the Commons who are very, very angry and feel that he has lost so much respect for having done what he has done."
Independent MP Nick Boles, who resigned from the Conservative Party earlier this year, tweeted: "Boris Johnson isn't even PM yet and he is already responsible for a grievous blow to the UK's international reputation. By refusing to back Kim Darroch in the face of bullying by President Trump, he made his resignation inevitable."
Shadow Foreign Secretary Emily Thornberry 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."
First Minister Nicola Sturgeon tweeted: "It is shameful that Kim Darroch has effectively been forced out for doing the job that diplomats are appointed to do. Boris Johnson’s failure last night to stand up for him - and stand up to the behaviour of Donald Trump - spoke volumes."
And Scottish Tory leader Ruth Davidson posted on twitter: "It is the job of diplomats to report accurately and give their professional analysis honestly. Leaks should not happen. In the (very) rare occasion where they do, the diplomatic corps have to be protected and defended or we degrade the whole service."
In a letter to Sir Simon McDonald, Permanent Under Secretary at the Foreign and Commonwealth Office, Mr Darroch wrote: "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. 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."
The Prime Minister's spokesman said Mr Darroch would continue in his post until his successor is appointed, but did not offer any timescale, saying only that a new ambassador would be named "in due course". Mrs May is set to leave office in two weeks.
In his reply, Mr McDonald told the ambassador that he was accepting his 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," he said.
"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.
"I understand your wish to relieve the pressure on your family and your colleagues at the embassy; I admire the fact that you think more of others than yourself. You demonstrate the essence of the values of British public service."
READ MORE: Tory leadership: Boris Johnson slammed for dodging questions in fiery TV debate
Mr McDonald made a scheduled appearance to give evidence to the Commons Foreign Affairs Committee on Wednesday afternoon, and told MPs that even hostile states had not forced the departure of a UK ambassador in his 37 years in the department.
"This is not the first time a British ambassador has left post or resigned because of actions against the host government but usually they are governments with whom we have problematic relations rather than friendly relations," Sir Simon said.
Labour MP Chris Bryant asked: "Even then have there been many occasions in your experiences where there's been a complete refusal by a head of state to work with a British envoy?"
"I know of none", Sir Simon replied.