The American war in Afghanistan is over. In the predawn hours of July 2, US troops slunk away from Bagram Air Base, without even informing the local Afghan commander. It was a sorry end to a sad and futile war.

For 20 years Bagram was the Gibraltar of American power in Afghanistan, the single largest Nato base in the country, housing 10,000 troops, thousands more support personnel and a Pizza Hut. Now Bagram, and the adjacent prison holding 5,000 Taliban fighters, are in the hands of the Afghan military, which soon showed its mettle by letting an army of looters plunder the base. While the Americans took care to blow up their ammunition before leaving, they left lots of goods ranging from bottles of water and MREs to laptops and even motor vehicles for the more enterprising locals to seize.

From the moment President Biden announced that American troops would be out of Afghanistan by the 20th anniversary of the 9/11 attacks, the shadow of doom has come over that country. We can call it ‘withdrawal’, but it is retreat. As US soldiers depart, the Afghan state they toiled so long to build has been reduced to little more than an archipelago of provincial capitals. Soon, it may be little more than Kabul.

The Graveyard of Empires has seen its latest interment.

Even in failure, the war has been a testament to the sheer scale of American superpower. Across two decades, hundreds of thousands of soldiers, contractors, diplomats and do-gooders labored mightily to transform a landlocked, backwards, tribal nation of more than 30 million into a Westernized, liberal parliamentary democracy. It has cost the United States an estimated $2.26 trillion.

Yet so great are America’s resources, so limitless its wealth that, despite the mammoth cost, the war has been a sideshow nearly the entire time, overshadowed first by Iraq, then by Libya, and then by Syria and Isis. As the war continued, it became seen as the definitive ‘forever war’ — a conflict waged with no coherent plan for achieving victory, and no agreement on what victory even might be.

Now the time has come to accept that even superpower has its limits. America is not the country of seemingly limitless capacity that invaded Afghanistan in a frenzy of anti-terrorism after 9/11. Her national debt has grown from $6 trillion to more than $28 trillion. Her middle class has been enfeebled by outsourcing, automation, financialization and debt. No longer the undisputed hegemon, she now must consider China a military and economic rival.

The justifications for the war in Afghanistan ranged, as it went on, from avenging 9/11 to preventing future terrorism to spreading democracy to preserving women’s rights. By 2021, war advocates were reduced to arguing International Relations theory, warning that China would surely swoop in and fill the vacuum of a US departure. They needn’t worry. Right now, only America seems to believe that indefinite military deployments are a wise use of a nation’s resources.

The interventionists howl that we are abandoning Afghanistan, that it will become a ‘terrorist haven’. ‘If the Taliban takes over part of Afghanistan, I fear that al-Qaeda and Isis will reemerge, and we will be paving a way for another 9/11,’ said Sen. Lindsey Graham in early July. Yet the first 9/11 was planned mostly in an apartment in Hamburg, not Kabul. Conquering Afghanistan did nothing to destroy al-Qaeda, and terrorists have proven perfectly capable of planning and conducting attacks without any ‘haven’ in which to operate. Twenty years of war have shown that terrorism is a law-enforcement problem, not a military one.

Leaving Afghanistan is the right decision. It is indisputably the best one made so far by the young Biden administration, which should resist all pressure from the war enthusiasts of Langley, Foggy Bottom, the Pentagon and K Street to perpetuate the conflict.

If the Afghan government fully collapses, and the country returns to Taliban rule, congressional Republicans will find it politically irresistible to thrash Biden for it. But America’s political class should not allow itself to be re-entranced by the prophets of perpetual war. Let America shepherd its strength for a real crisis, rather than fighting the ghosts of 20 years ago.

With the passage of time, the Afghan war may seem the lamentable misadventure of a hegemon drunk on its power to remake the world. Or it may come to be seen as the inflection point in America’s decline. But if America is to remain a superpower, the age of elective wars must come to an end. America’s war-making must be governed by a sense of reason and proportionality.

The Trump administration set a good precedent by refusing to start any new American wars. Now, the Biden administration has overcome enormous pressure to end America’s longest one. Let us hope that this bipartisan shift toward peace can last.

This article was originally published in The Spectator’s August 2021 World edition.