The writer, a former deputy assistant secretary of defence, led US military units in Afghanistan

We arrived in the dark. My platoon had first deployed to Kuwait in the confusing weeks after the attacks on September 11, and we didn’t set foot in Afghanistan until March the next year. We slept that first night on the cold concrete floors of a half-demolished building. When we woke, the first thing that struck us was the immeasurable beauty of the Hindu Kush mountains.

Afghanistan, people often forget, enjoyed a relatively lucky century before the Soviets invaded in 1979. That was no longer the case when we arrived in 2001, however. And, in the same way that Afghanistan had been at war for two decades prior to our arrival, it is a safe prediction that it will continue to be at war after the withdrawal of all US troops by September. The Afghans — many of whom fought with us, many of whom fought against us, all of whom suffered — will continue their war.

Some 800,000 Americans fought in Afghanistan, but most of us saw combat in the first decade. For many, the current conflict thus seems a long way off. When I heard the news that President Joe Biden was going to end America’s involvement, I was working from home in Texas, my days in uniform long past, my three young children playing.

I was moved, though, to see our 78-year-old president walking among the graves of Section 60 in Arlington National Cemetery. When I lived in Washington, I would take my family there each Memorial day to visit the grave of a friend who had been killed in Afghanistan’s Kunar province in 2006. Now the president walked among those same sites. “Look at them all,” Biden told journalists who accompanied him. “Look at them all.”

A profoundly decent man, Biden never forgot that young men and women bear the brunt of the decisions of their elders. During the second term of the Obama administration, I spent a week travelling with the then vice-president in my capacity as the Pentagon’s senior Middle East policy official. Each morning, I called my office to ask whether any American lives had been lost in combat overnight. Biden always carried a card with the precise number of Americans who had been killed in Iraq and Afghanistan. I knew he might ask me for the latest figure, and I didn’t want to get it wrong. You knew he took each of those lives lost personally.

In the waning days of that administration, I asked a colleague with responsibility for coordinating our policy towards Afghanistan why we were still there. She sighed and said to me, “Because the known risks of staying outweigh the unknown risks of leaving.” It is as hard to prove a negative in policymaking as it is anywhere else: was our small residual presence the thing preventing another major terror attack in the US?

It is fashionable to blame the stubborn optimism of our military leaders for our war in Afghanistan dragging for as long as it did. And given the overly rosy assessments of the war’s “progress”, delivered by commander after commander, year after year, I understand the anger and frustration levelled at them by activists, younger veterans and others.

But military officers do not start or end wars in the US; elected civilian leaders do. Biden’s two immediate predecessors — one Democrat, the other Republican — both lost faith in this war, but neither was bold enough to accept the kind of risk involved with ending it. Biden deserves some credit for doing so.

Yet the risk calculus has changed in the 12 years since Obama announced his first surge of troops to Afghanistan — something that I and many others supported. Today, with the 2001 attacks a distant memory for most Americans, and with more than 500,000 dead from a pandemic at home, the still-unknown risks of withdrawal seem much less scary than they once did. The vast expenditure of resources — some $45bn a year, according to one Pentagon estimate — in a landlocked central Asian country seems much more extravagant.

The voices of dissent, meanwhile, are far quieter than they would have been a decade ago. There is no meaningful pro-war constituency in either party — not after Trump, whose scepticism towards the war was vocal. As with much else that Biden is doing these days, from pandemic relief to infrastructure spending, his Afghanistan decision will be popular: based on recent polling, a majority will probably support him.

The withdrawal is not without risks. It will be harder to continue training Afghan troops and harder still to launch special operations raids there. But the president’s team will feel those risks can be mitigated.

Harder to mitigate are the risks to Afghans themselves: the Taliban will feel encouraged by Biden’s announcement, and the Afghan government will defend itself by any means available, including largely indiscriminate air strikes. By one estimate, 3,800 Afghan civilians died in these in 2018 alone.

As for us veterans, we are left with the memories of a hard-fought conflict in which we won little but lost much. Most of us, I reckon, don’t think about the war too often. A few weeks ago, though, my son pulled a tan beret off the bookshelf and asked if it was mine. I said it was. And then the memories come back. But like the war, those too will fade over time.