The British ambassador to the U.S. who criticized President Trump has resigned, the U.K. Foreign Office said Wednesday.

Ambassador Kim Darroch — in documents leaked in recent days — slammed the Trump administration as "diplomatically clumsy and inept," and said he doubted it would become "substantially more normal."

FLASHBACK: TRUMP SAYS US WILL 'NO LONGER DEAL' WITH BRITISH AMBASSADOR AFTER LEAKED ANTI-TRUMP CABLES

In a resignation letter on Wednesday, Darroch said "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," he wrote, noting the situation "has brought home to me the depth of friendship and close ties between our two countries."

Darroch said he is "grateful to all those in the U.K. and the U.S., who have offered their support during this difficult few days."

Prime Minister Theresa May said Wednesday it was a "matter of regret" that Darroch resigned.

A day before Darroch's resignation Downing Street said he “continues to have the prime minister's full support,” adding that “we have made clear to the U.S. how unfortunate this leak is” and that “the selective extracts leaked do not reflect the closeness of, and the esteem in which we hold, the relationship.”

A source close to the matter told Fox News on Wednesday that Darroch will remain in Washington, D.C. until the prime minister chooses his replacement — and with May leaving her role, it's unclear when the next ambassador will arrive in the U.S. The source added that Darroch is leaving his post with his "head held high."

UK PM THERESA MAY ANNOUNCES RESIGNATION AMID FURY OVER BREXIT HANDLING

The memos Darroch wrote about the Trump administration were meant for a limited audience. The documents were published in Britain's Mail on Sunday newspaper.

Following the leak, Trump described Darroch as ineffective and said "he has not served the U.K. well."

“I do not know the Ambassador, but he is not liked or well ... thought of within the U.S. We will no longer deal with him,” Trump tweeted.

CLICK HERE TO GET THE FOX NEWS APP

Britain's Foreign Office did not challenge the authenticity of the leaked documents, which covered the period of 2017 to the present, and came to Darroch's defense. It called the leak "mischievous behavior" and said the public has expected diplomats to provide honest assessments of the politics in the countries where they're posted.

It's customary for senior British diplomats posted overseas to file straightforward memos to senior ministers and security services analysts back home so political trends and possible threats to British interests could be gauged, but it's unusual for a large number of them to be made public.

Fox News' Rich Edson, Gregg Re and Lukas Mikelionis and The Associated Press contributed to this report.