The United States is closer than ever before to withdrawing from Afghanistan and putting this 18-year, $841 billion misadventure behind us.

The framework of a potential deal has been well-known for quite some time: In exchange for the removal of American and other foreign troops, the Taliban would ensure Afghanistan doesn’t represent a terrorist threat to the American people. Taliban leaders would also sit down with other Afghan stakeholders for comprehensive talks on the political future of the country and agree to a cease-fire (or at least a significant reduction in violence). The details have been the subject of intensive negotiations for weeks.

We don’t know whether negotiations can reach the finish line. What we do know, however, is that many high-profile foreign policy hawks in Washington, D.C. are adamantly opposed to U.S. withdrawal regardless of the circumstances. And all this obstinacy revolves around the same flawed argument: If American forces leave, the Taliban will inevitably break whatever deal it signed and welcome al Qaeda just as it did before 9/11.

Retired Gen. David Petraeus made this point in his Aug. 9 Wall Street Journal op-ed, writing that if “the Trump administration orders a full pullout from Afghanistan, there is considerably less doubt about what will happen—full-blown civil war and the re-establishment of a terrorist sanctuary as existed when the 9/11 attacks were planned there.” National Review’s Andrew McCarthy took this argument one step further, claiming that “by pulling out of Afghanistan at this moment, we are enabling recreation of the conditions that obtained circa 1998 through 2001.”

Both are wrong for the reason articulated by John Glaser and John Mueller in a recent Cato Institute paper : The United States is not the only country that has an interest in protecting its people from terrorism.

It is in no one’s interest — not Russia, China, Iran, India, or any other nation — to permit Afghanistan to revert to its previous state as an epicenter of global terrorism. Washington should seize this reality and stop acting as if other countries, especially regional powers close to Afghanistan, will fail to counteract groups like al Qaeda and the Islamic State in the absence of American military intervention.

Russia, China, the Central Asian states, India, Iran, and Pakistan disagree on much in Afghanistan, including how a peace settlement should be structured and the extent of Taliban participation in any government. Despite their many differences, these nations share a pressing interest in defending their citizens and ensuring terrorist groups on Afghan soil are continuously monitored and degraded.

Nobody wants a terrorist headquarters next to their borders.

Since the 1990s, Russia has suffered its fair share of terrorist attacks on transportation centers, public spaces, and schools. Russian security services have already warned about the Islamic State presence in Afghanistan and indeed have provided the Taliban with military supplies and arms to combat it. Moscow is likely to persist in these covert operations regardless of whether or not American troops are on the ground.

Iran has likewise increased its own military relationship with segments of the Taliban in Afghanistan in order to enhance the security of its border. Having seen the Islamic State ransack Iraq in 2014, Tehran has no intention of passively allowing a similar development to occur in its eastern neighbor. For Iran, courting the Taliban as a bulwark against terrorism is a pragmatic investment.

China’s incentive to keep Afghanistan somewhat stable is also high. Beijing’s Belt and Road development network, which runs through Afghanistan, requires predictability to assure businesses commerce can flow uninterrupted. And an Afghanistan beholden to terrorist groups is not only bad for business — it is a threat to Chinese security.

Still, we shouldn’t sugarcoat it: After American intervention ends, Afghanistan will continue to be a very violent place. Even if a peace deal is struck, there is no guarantee the Taliban will follow through with its obligations. And if the Taliban do implement any accord, the more hard-line and irreconcilable elements of the movement will simply carry on fighting.

But Afghanistan’s internal stability and politics are beyond Washington’s control. The United States has no interest in getting stuck in the weeds of Afghan politics. The politics of Afghanistan are for Afghans to figure out. Realistically, tying a U.S. withdrawal to Afghan reconciliation is a roundabout way of blocking withdrawal indefinitely.

The United States has one national security objective in Afghanistan: ensuring our homeland and people are reasonably safe from transnational terrorism, and this objective doesn’t require endless U.S. occupation. It can be achieved through quick strike assets, intelligence, surveillance, and reconnaissance systems, and old-fashioned intelligence collaboration with the many other nations that are as willing to fight terrorism as we are.

Daniel R. DePetris is a fellow at Defense Priorities and a contributor to the Washington Examiner’s Beltway Confidential blog.