LONDON — Karen Pierce, a senior career diplomat, will become Britain’s next ambassador to the United States, inheriting the tricky task of strengthening the country’s somewhat frayed “special relationship” with Washington at a time when London is at odds with Washington over several critical policies.

Ms. Pierce, the first woman to be chosen for the new role, is currently Britain’s permanent representative to the United Nations. She will succeed Kim Darroch, who resigned last year after the leak of diplomatic cables revealed he had characterized the Trump administration as “clumsy and inept,” among other things.

President Trump responded by describing Mr. Darroch as “wacky,” a “very stupid guy” and a “pompous fool,” while adding that Theresa May, who was prime minister at the time, was “foolish” for ignoring his advice on Britain’s exit from the European Union.

When Boris Johnson took over from Mrs. May last year, he basked in warm praise from Mr. Trump, who supports the new government’s full-throated commitment to Brexit. And having left the European Union last month, Britain wants to strike a free-trade agreement with the United States as soon as possible.