Britain's ambassador to the United States Kim Darroch resigned on Wednesday, amid ongoing diplomatic row over leaked emails critical of US President Donald Trump's administration.
"The current situation is making it impossible for me to carry out my role as I would like," said Darroch, a career diplomat.
The UK Foreign Office confirmed Darroch's resignation.
Darroch is at the eye of a diplomatic storm after remarks he made about US President Donald Trump's administration, and shared with UK officials in confidence, were leaked over the weekend.
"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 in a letter to the Foreign Office.
"I want to put an end to that speculation," he added.
In response to the letter, Simon McDonald, permanent under secretary and head of the diplomatic service, said Darroch had served a "long and distinguished career, with dignity, professionalism and class", BBC reported.
"You are the best of us," Simon said, describing the leak as "malicious".
Britain's Prime Minister Theresa May said it was a "matter of great regret" that Darroch felt the need to resign.
He has "given a lifetime of service to the United Kingdom and we owe him an enormous debt of gratitude," she added.
The scandal broke out over the weekend when classified emails from Darroch to a range of UK government officials emerged in the media.
Trump launched a tirade against the diplomat as "not liked or well thought of within the US" and that he would "no longer deal with him".
His characteristic social media attack extended to May, as he tweeted: "I have been very critical about the way the UK and Prime Minister Theresa May handled Brexit."
"What a mess she and her representatives have created. I told her how it should be done, but she decided to go another way."
In some of his communications leaked to the 'Mail on Sunday', Darroch, who became ambassador to the US in January 2016 about a year before Trump took office, questioned whether the White House at the time "will ever look competent" but also warned that the US president should not be written off.
The emails, dating from 2017, said rumours of "infighting and chaos" in the White House were mostly true, the White House under Trump was "uniquely dysfunctional" and that the policy on sensitive issues such as Iran was "incoherent, chaotic".
The US president took to Twitter to attack Darroch as a "very stupid guy" after disinviting him from an event at the White House on Monday night in retaliation.
In a debate for the Tory leadership contest on Tuesday, frontrunner Boris Johnson repeatedly refused to say whether he would keep Darroch in post if he became prime minister.
UK foreign secretary Jeremy Hunt, one of two British Prime Ministerial hopefuls alongside Johnson, backed the diplomat, saying it was important for diplomats to be able to give frank views to ministers.