Sir Kim Darroch has resigned as the British Ambassador to the United States over leaked emails critical of Trump administration.

In a letter to the head of the Foreign Office, Sir Simon McDonald, Sir Darroch said it had become "impossible" for him to carry out his role after it emerged he dubbed the White House "uniquely dysfunctional" and said Trump "radiates insecurity".

In a statement, Darroch 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.

READ MORE: Theresa May expresses 'full faith' in ambassador Sir Kim Darroch after emails about Donald Trump administration 'maliciously' leaked 

“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.

“I am grateful to all those in the UK and the US, who have offered their support during this difficult few days. This has brought home to me the depth of friendship and close ties between our two countries. I have been deeply touched.

READ MORE: Alison Rowat: How our man in The West Wing led the way by pushing the Special Relationship to its very limit 

“I am also grateful to all those with whom I have worked over the last four decades, particularly my team here in the US. The professionalism and integrity of the British civil service is the envy of the world. I will leave it full of confidence that its values remain in safe hands.”

Last night Boris Johnson refused to rule out sacking Darroch if he became Prime Minister. 

In the Commons, Theresa May told MPs that she had spoken to Sir Kim and told him that it was a “matter of great regret” that he felt it necessary to leave his post.

“The whole Cabinet rightly gave its full support to Sir Kim on Tuesday. Sir Kim has given a lifetime of service to the United Kingdom and we owe him an enormous debt of gratitude,” she said.

“Good government depends on public servants being able to give full and frank advice.

“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 his reply to Sir Kim, Sir Simon said 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 the 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.”