In the particular case of Afghanistan, and South Asia more generally, the newest concern is ISIS-Khorasan, or ISIS-K. In recent years, it has probably become the strongest and largest ISIS affiliate outside Syria and Iraq, and has set up shop in the mountain ranges of Afghanistan. Its stated ambitions, however unrealistic, are to establish a broader caliphate stretching from Iran to the former Soviet republics of Central Asia to India and Pakistan. These ambitions give rise to the worry that ISIS-K could someday collaborate with Lashkar-e-Taiba, the Pakistani group that carried out the Mumbai attacks of 2008, or another apocalyptic anti-India group.

Given the foreboding geography and weak Afghan government, squelching ISIS-K might be less realistic than defeating ISIS in eastern Syria or Iraq. But with the bases we have now, we can watch and listen to this group and strike when we get a good lead on the movement of a key leader or when it gets too comfortable in any one location. As many as three of its top leaders have already been removed from the battlefield by coalition forces in the last couple of years.

This platform in South Asia complements other United States counterterrorism capabilities in the broader Middle East, especially in places where local governments are weakest and threats are greatest. American military facilities in Qatar and Kuwait and Bahrain, as well as ships in or near the Persian Gulf, support operations in Iraq and Syria. United States bases in Djibouti help us maintain vigilance over Yemen, Somalia and other parts of the Horn of Africa and Gulf of Aden region. The Sixth Fleet, and American assets in Italy, provide a watchful eye over Libya and the rest of northern Africa.

A presence in Afghanistan in effect completes the web. Few major areas of likely terrorist concentration or activity are more than a few hundred miles away from America’s eyes and ears — and, if necessary, its commandos, drones and other tactical assets. All of this is expensive, but not inordinately so — perhaps costing roughly 30 billion to $70 billion a year, based on an analysis of estimates from the Congressional Budget Office. That’s still less than 10 percent of the Pentagon’s budget for 2019.

Today the Afghan government controls only some of its own country — about 55 percent of all administrative districts, where about 65 percent of all Afghans live, according to C.I.A. estimates. Yet it does hold all the major cities and most major roads. For narrow American counterterrorism purposes, that is probably adequate, assuming it can be sustained.