“THE CURRENT situation is making it impossible for me to carry out my role as I would like.” Thus did Sir Kim Darroch resign as Britain’s ambassador to Washington, the country’s top diplomatic post, on July 10th. His departure came days after the Mail on Sunday, a newspaper, published a selection of his cables that were highly critical of President Donald Trump and his administration. In the end, he was undone by a one-two from the West’s leading populist combo, Mr Trump himself and his apprentice, Boris Johnson, Britain’s probable next prime minister. The former froze him out of dealing with his government, while the latter refused to back him in a televised debate on the Tory leadership contest, which Mr Johnson is likely to win.

The furore will test the “special relationship”, on which Western defence is founded, as it has not been tested for a long time. Few can remember a time when the ambassador of a close ally had been so humiliated by an American president. It has also sparked a domestic political storm. Thus, just when it should be preparing for a post-Brexit “Global Britain”, the Foreign Office finds itself fighting fires both at home and in relations with the countries it most needs to cultivate.

In truth Sir Kim’s cables, covering a period from 2017 to today revealed little that has not been said frequently in the press. Still, coming from a top British diplomat, the assessments make juicy reading. Sir Kim describes the Trump administration as “dysfunctional” and “diplomatically clumsy and inept”, and did not expect that to change. A memo from June 2017 described reports of “vicious infighting and chaos” inside the White House as “mostly true”.

Unsurprising as these views may be, their leaking is damaging, and has set off a hunt for the mole and speculation on the motive. Already, in the spring, a leak from Britain’s National Security Council over policy towards Huawei, a Chinese telecoms giant, led to the May Day firing of the defence secretary, Gavin Williamson. Now another episode has strengthened the impression that something is rotten in the heart of British government. Frank, confidential assessments of the countries where they serve is core to diplomats’ jobs.

That the Darroch files emerged through a journalist, Isabel Oakeshott, who is a well-known Brexiteer has fed theories that this is all part of the battle over Brexit. Sir Kim was Britain’s permanent representative to the European Union and national security adviser under David Cameron before heading to Washington in 2016, and is seen as a Europhile. Suspicions range from familiar Russian mischief-making to the even more unsettling idea that the leaker hoped to ensure a more Brexit-friendly person is put in the key diplomatic post after, as is widely expected, Mr Johnson becomes prime minister later this month.

If Mr Trump had his way, Britain would have long ago appointed Nigel Farage, the Brexit Party leader, as its man in Washington. After news of the leak broke on July 7th, he made his views about Sir Kim plain. “The ambassador has not served the UK well, I can tell you that,” the president said. “We’re not big fans of that man.” He announced a boycott of Britain’s ambassador: “We will no longer deal with him,” he declared. He described him as “wacky” and a “pompous fool”.

Sir Kim was reported to have been disinvited from a dinner on July 8th for the emir of Qatar hosted by America’s treasury secretary, Steven Mnuchin. For good measure the president also rubbished the way Britain’s prime minister, Theresa May, had handled Brexit (“What a mess she and her representatives have created”), and looked forward to her imminent replacement (“The good news for the wonderful United Kingdom is that they will soon have a new Prime Minister”). In fact Sir Kim had hitherto been seen in Washington as a capable and effective figure who was well liked by members of the Trump administration.

Back home, the British government rallied behind its man—but not Mr Johnson. In the televised debate on July 9th between the two rivals to succeed Mrs May, Jeremy Hunt, the foreign secretary, made it clear that he would keep Sir Kim in his job until he was due to retire at the end of this year, but Mr Johnson, the champion of “taking back control”, avoided any such commitment. Sir Kim resigned the following morning. His no doubt sensible advice in a leaked memo on how to deal with this administration was to “flood the zone”: influence as many of Mr Trump’s advisers as possible. Yet he has ended up drowning, leaving behind tricky decisions: who should replace him (a career diplomat or a Trump-friendly political appointee?), and who should take that decision (Mrs May or her successor?).

And the strain on Britain’s “special relationship” with one superpower comes as its supposed “Golden Era” in relations with another, China, is looking distinctly tarnished. Tensions over the recent demonstrations in Hong Kong are the latest in a series of irritations that include policies towards Huawei and maritime rights in the South China Sea. Last week the Foreign Office summoned Liu Xiaoming, China’s ambassador to the UK, to complain about his criticism of British “interference” in the affairs of Hong Kong, its former colony. A foreign-ministry spokesman in Beijing accused Mr Hunt of “basking in the faded glory of British colonialism and obsessed with lecturing others.”

Britain is also at loggerheads with Iran. Last week it seized a tanker in Gibraltar that it suspected of smuggling Iranian oil to Syria, provoking threats of retaliation against Britain (including the seizure of British ships).

The international-trade secretary, Liam Fox, is meant to be paving the way for a future deal with America, but in Washington this week he had a front-seat view of how fraught handling this administration might be. Rolling out the red carpet for Mr Trump in London for an official state visit only a few weeks ago did not change that (as Sir Kim predicted), nor would having a Brexiteer as the next ambassador. The EU, meanwhile, has been busy doing actual trade deals: its pact with Japan came into force in February and last month it reached agreements with Mercosur, a big Latin American trade club, and Vietnam. Global Britain has a lot of catching up to do.