Kim Darroch said on Wednesday he was resigning after drawing Donald Trump's ire.

Britain's ambassador to Washington Kim Darroch said Wednesday he was resigning after drawing Donald Trump's ire for calling the US president "inept" in leaked confidential cables to London.

Darroch said in a resignation letter to the Foreign Office that the scandal made it "impossible" for him to continue representing British interests in the United States.

Trump has said his administration would no longer "deal" with Darroch.

"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," Darroch 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," he said.

"I believe in the current circumstances the responsible course is to allow the appointment of a new ambassador."

Prime Minister Theresa May told parliament moments after Darroch's resignation that the criticism he faced was "beyond unfair and wrong".

"I think he's given honourable and good service and he should be thanked for it," she said.

The Mail on Sunday's publication of Darroch's cables set off a political firestorm in London and saw Trump launch two successive days of Twitter attacks against the envoy and May.

One of the cables called the Trump administration "uniquely disfunctional" and another characterised the US leader as "inept" and "insecure".

Trump tweeted Monday that Darroch "is not liked or well thought of within the U.S. We will no longer deal with him." He also welcomed the "good news" that Prime Minister Theresa May was stepping down in two weeks.

The US leader followed that up on Tuesday by calling "wacky Ambassador" Darroch "a very stupid guy".

The scandal saw Darroch taken off the guest list of a dinner attended by Trump on Monday.

He also missed visiting UK Trade Minister Liam Fox's talks in Washington on Tuesday with the president's adviser and daughter Ivanka Trump.