The United Kingdom’s ambassador to the United States, Sir Kim Darroch, has quit his post a day after US President Donald Trump labelled him “wacky”, “pompous” and “very stupid”.

Sir Kim came under fire from Mr Trump after the leak on Sunday of official documents he had sent back to the UK Government that described the White House as “dysfunctional” and Mr Trump “inept”.

In a statement, Sir Kim said the situation had made it “impossible” for him to carry out the role he has held since 2016.

“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,” he wrote.

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

Sir Kim also thanked those in the UK and US who had offered him support since the leak and that he was “deeply touched”.

Prime Minister Theresa May said Sir Kim had given “a lifetime of service” to the United Kingdom.

Mrs May told Parliament she spoke to Sir Kim on Wednesday morning and said she did not want him to resign.

Mrs May says diplomats must be able to give “full and frank advice” and she wants all public servants to have the confidence to do that.

The diplomatic row comes at a critical time for Britain as it hopes to strike a trade deal with the US, its closest ally, after it leaves the European Union — currently scheduled for October 31.