Beyond this, the push for an indefinite U.S. military presence in Afghanistan ignores the fact that this kind of presence throughout the Middle East has been a key motivation for al Qaeda and related groups since the 1990s. The War on Terror has not only failed to eliminate terrorism, it has also poured fuel on the fire as the extended American presence and military action in Afghanistan, Iraq and elsewhere helped spawn dozens of new terrorist groups and thousands of jihadists, most prominently the Islamic State.

In Afghanistan terrorism was almost unknown before 2001, but between 2002 and 2015 over 9,000 terrorist attacks took place in Afghanistan alone, the majority of them after President Obama’s surge began in 2009. It is hard to imagine a strategy that would have done a better job at fomenting terrorism than the U.S. effort in Afghanistan.

Moreover, the notion that preventing terrorists from hiding in Afghanistan is either necessary or sufficient to prevent attacks on the American homeland is misguided. It is not necessary because despite the escalation of terrorism in the Middle East, terrorism remains the province of an extremely small number of people and organizations, all of which have very limited capacity for attacking the United States directly. Even the Islamic State, which temporarily enjoys access to significant resources, has no better way to attack the United States than to encourage lone wolves who live here to act on their own. Thus, despite fears there have been relatively few terrorist attacks in the United States since Sept. 11.

Finally, it makes little sense to frame the fight against terrorism in the context of a land war. Al Qaeda’s metastasis into regional franchises and the Islamic State’s ability to inspire even minor long distance attacks make clear that preventing terrorism is not simply a matter of controlling territory.

In the absence of a counter‐​terrorism rationale, there are no other sufficiently compelling reasons to keep American forces in Afghanistan. The argument that the United States could use a rebuilt and friendly Afghanistan as a forward base for fighting other terrorists in the region also falls apart upon inspection. More American military intervention in the greater Middle East won’t stop terrorism, but it will ensure that Americans keep dying for little return, at great cost, for years to come.

What about regional stability and the moral obligation to help Afghanistan rebuild? There is no question that the United States bears some responsibility for the state of affairs in Afghanistan. But after 15 years and $800 billion the evidence clearly suggests that there is not much the United States can do to improve things.

Even after heroic efforts by the United States and its coalition partners, the security situation in Afghanistan remains appalling. The United Nations estimates that Afghanistan is suffering 10,000 civilian casualties per year (3,000 of them deaths), and the Afghan security forces are losing 5,000 per year to the fighting. Afghanistan is a country of just 30 million people. Those casualties are the equivalent of the United States suffering 84,000 deaths each year.

Meanwhile neither the economy nor the political situation in Afghanistan gives a great deal of hope for the near future. Though nation building is a noble goal, it is difficult to justify when there is little prospect of success and when the resources it requires could be put to more productive use elsewhere.