Dominic Raab has been reluctant to criticise Joe Biden, who has faced an unprecedented wave of criticism over the US exit from Afghanistan, partly because he always saw the decision as inevitable, and partly because in principle he instinctively sympathises with it.

The foreign secretary is trying to position the UK as close as possible to the Biden administration, even though the criticism of the US president continues unabated from former British diplomats, politicians, security chiefs and military figures.

Raab’s instinctive sense that Afghanistan was yesterday’s war, unlikely to flare up as a first order issue until next year, may also explain why he deputed the issue to a minister. There is surprise, for instance, that Raab took credit at the foreign affairs select committee for overseeing backchannel talks between Pakistan and Afghanistan over the last year. The talks were built on the personal initiative of the chief of the defence staff, Gen Sir Nick Carter, and depended on his relationship with the then Afghan president, Ashraf Ghani, and Pakistan’s army chief of staff, Gen Qamar Javed Bajwa.

Senior sources in Pakistan said Bajwa had great respect for Carter but had never met Raab.

Raab’s priority was great power competition, not terrorism, so his itinerary and call log reflects a deep interest in India and south-east Asia. That did not include Pakistan, let alone Afghanistan, explaining his previous failure to contact the Pakistani foreign minister.

Indeed he told a select committee in October 2020 that he specifically excluded Pakistan from his definition of the Indo-Pacific.

Raab explained this week that he and the UK ambassador to the US, Dame Karen Pierce, had concluded from presidential campaign rhetoric that the August troop withdrawal timeline was “baked in”. Biden had been a key sceptic of the US troop surge under Barack Obama. He had secretly visited Afghanistan and Pakistan at Obama’s instructions in January 2009, when he had furious discussions with both the Afghan and Pakistani presidents over the war. He had been accompanied on his trip by his now secretary of state, Antony Blinken, who like Biden saw nothing but muddled goals.

The UK Ministry of Defence (MoD) was historically more invested in the war, and according to one former UK ambassador to Afghanistan, Sherard Cowper-Coles, incurably optimistic. Ben Wallace, the defence secretary, tried hardest at Nato defence and foreign affairs meetings in the spring to see if support for a continued Nato mission in Afghanistan was possible without US involvement.

That in part explains the briefing war between the Foreign Office, the MoD and others in the Cabinet Office. It was not just about the grip of the Foreign Office in rescuing those stranded in Afghanistan. The MoD believed in the mission, though Raab less so.

Raab has not fully articulated his views on the 20-year war, possibly waiting in vain for a definitive lead from the prime minister. But he hinted at them at the select committee this week. He said: “From 2001 there are questions about what was the mission, how it adapted, have we at every stage reconciled our means and our ends, and what the exit looked like in a strategic way. There are lessons to be learned about the way a campaign primarily morphed from counter-terrorism into something more akin to nation building. We have to recognise the support domestically for these kinds of interventions has fallen away.”

Raab has said he is sure the US will bounce back, but other senior diplomats, including many in Europe, are less sanguine. In the wave of relief at Donald Trump’s departure, there was collective misreading of Biden and his promise that the US was back. For Britain, the end of the honeymoon is especially acute.

The former Nato secretary general Lord Robertson describes it as “a crass surrender”. The former foreign secretary Jeremy Hunt sees a dangerous split in the transatlantic alliance, highlighting decisions imposed on the UK. The former cabinet secretary Mark Sedwill condemned “a bad policy badly implemented”. The former No 10 foreign policy adviser Tom Fletcher said: “We expected empathy, strategy and wisdom from Biden. His messaging targeted Trump’s base, not the rest of the world, and not allies, past or (we’ll need them) future.”

The former UK ambassador to Washington Kim Darroch perceived a defeat and a humiliation. Another said: “The G7 looks like the G1. When the rest of the G7 asked for a few days’ delay, and even went public, Biden gave us nothing.”

In Europe there is similar dismay. “We must strengthen Europe so that we will never have to let the Americans do it again,” exclaimed Armin Laschet, the CDU candidate for the German chancellorship.

Not surprisingly, there is now return of fire in the US from the many supporters of Biden’s decision. Emma Ashford, a leading advocate of a new grand strategy of US restraint, said: “If this episode pushes America’s European partners to improve their own military capabilities for this kind of thing, I’ll be thrilled.” Stephen Walt, a professor at Harvard, writes in Foreign Policy that he is “mystified” by “the anguish of Europeans, which sometimes borders on hysteria”, and irritated by their lessons on “moral responsibility”.

Senior diplomats say the US relationship has been through these squalls before, and now that “over the horizon” terrorist spotting is becoming the new order, they believe the need for intelligence cooperation only grows in significance.

But it is a sobering moment and may yet require Biden to explain himself at the UN general assembly this autumn.

John Casson, a former foreign policy private secretary in No 10, recently checklisted what his five personal objectives in diplomacy had been, admitting disarmingly that it was a chastening list of failure. The goals were: “Stay and lead in the EU; help young Arabs get free of authoritarians; the Foreign Office innovative and impactful, not timid and transactional; be a development superpower; leave Afghanistan well.”

At least he can now claim the set is complete.