Before President Donald Trump recalls U.S. forces from Afghanistan, he should remember why they were sent there, eighteen years and two presidents ago.

The September 11 attacks on New York and Washington, which killed nearly three thousand, were planned in a mud-brick house near Kandahar, when mastermind Khalid Sheikh Mohammed first sat on the dirt floor across from Osama bin Laden in 1998. The murderous plot grew in meetings in safe houses and training camps across Afghanistan. Al Qaeda was able to conspire in safety because it had the protection of the Taliban, which repeatedly denied U.S. requests to expel or extradite “Sheikh Osama.” U.S. negotiations, in both the Clinton and Bush years, often occurred in a Kandahar phone booth, as neither the Taliban foreign minister nor other senior officials had working phones in their offices. None of America’s multi-billion-dollar network of spy satellites or other signal-intelligence apparatus received any iota of warning of the atrocity to come.

If the United States were to abruptly pull out of Afghanistan, then a brutal civil war would pit Afghanistan’s outnumbered patriots against the Taliban, supported by neighboring Pakistan and from Qatar (which sheltered Khalid Sheikh Mohammed in 1996 and provided him with a well-paying, no-show government job.) After months of slaughter and cruelty, the Taliban would return to power. The sacrifices and hard-won successes of U.S. servicemen would be erased. And Taliban-ruled Afghanistan would once again provide safe haven for Al Qaeda and other extremists.

Indeed, it will be worse this time around. In the 1990s, Iran supplied most of the funding for the Northern Alliance, a collection of Afghan ethnic minorities, as a check against the power of the Taliban. This time, the mullahs in Tehran are expected to favor Taliban rule. Also, this time, ISIS will also find safe haven there. While driven from their Syrian strongholds, ISIS has established new inroads in Afghanistan and Pakistan. Indeed, ISIS has received favorable coverage in some of the Taliban’s Pakistani publications and its minor doctrinal differences with Al Qaeda do not keep it from working with them. It would not take much beyond the world’s recognition of the Taliban’s territorial sovereignty for the deadly ambitions of its allied terror groups to begin anew.

President Trump has said that U.S. withdrawal would be conditioned on security guarantees for the elected Afghan government. This is necessary but insufficient.

U.S. policymakers should study the USSR’s 1988–89 retreat from Afghanistan and America’s own 1973 withdrawal from Vietnam. Several lessons emerge: timetables for withdrawal only increase violence, as different factions jockey for power as the superpower exits. So, the United States should submit no such timetable, but tie specific increments of withdrawal to specific, irreversible actions by the other side.

Next, the United States should ensure that all stakeholders are a part of the talks, including Pakistan, China, Russia and Iran, which each border on Afghanistan (or once did) and have an interest in Afghanistan’s internal affairs. China and Russia share America’s interest in preventing Afghanistan from becoming another safe haven for radical Islamists; both have suffered terror attacks from such radicals.

Iran and Pakistan are much harder cases. While both nations would welcome America’s departure, neither is committed to Afghan independence. Each has funded proxies inside Afghanistan for decades and each, in its national constitutions, uses a nationalistic form of Islam to justify its rule at home and its actions abroad. Finally, Pakistan’s intelligence service, the ISI, created the Taliban in 1994 (the young Taliban leaders took no part in the anti-Soviet revolt) and continues to provide safe areas for the Taliban. Indeed, Pakistan tacitly supports a terrorist-tolerant Afghanistan since it would provide secure bases for the anti-India terrorists it also funds. When the United States left South Vietnam, it left two powerful enemies, North Vietnam and China, on its abandoned ally’s doorstep. It would be foolish to repeat this mistake in Afghanistan, with respect to Pakistan and Iran.

Still, the United States has leverage over both Iran and Pakistan. For one, America controls the pace of withdrawal—an outcome eagerly sought by Iran and Pakistan. For another, the United States has the support of the United Arab Emirates and Saudi Arabia, both of which have poured money and materiel into Afghanistan’s national army. Each is prepared to do more, both for humanitarian reasons and to check Iran’s threatening, growing role in their backyard. In Vietnam (and in the USSR’s case, Afghanistan), the retreating superpower failed to find regional allies to take its place in stabilizing the lands it was leaving. In this case, the Trump administration has two wealthy and determined local allies to call upon and should use them to enforce any final settlement. The threat of increasing Gulf Arab forces in Afghanistan would definitely concentrate minds in Islamabad and Tehran.

Even if Trump’s special envoy, Ambassador Zalmay Khalilzad, an experienced and competent diplomat, wanted to trust the Taliban’s promises, they should not expect the Afghan government to do so. Afghans know their lives on the line. President Trump should announce that he will not accept any ideal that is not first ratified by the Afghan government. Further, Pakistan should be held accountable for enforcing any Taliban promises and face trade, diplomatic and other penalties if their proxy, the Taliban, fails to comply.

Finally, the biggest mistake of retreating superpowers is to not define a desired end-state. President Trump should say that he envisions a multi-party democracy, one in which the Taliban is simply one party peacefully contending for power with others. Achieving that would honor the Americans who lost their lives to give the Afghans a chance at lives of their own making while ensuring that Afghanistan never again becomes a staging area for terrorist attacks. It would also stabilize the region by forcing Iran and Pakistan to become better neighbors.

All of this will take time. Negotiations should not march in step with America’s 2020 presidential election calendar. For those who want to hurry, remember how Nixon’s words “peace with honor” sounded as the last helicopter roared off of the roof of the U.S. embassy in Saigon.

Ahmed Charai is a Moroccan publisher. He is on the board of directors for the Atlantic Council, an international counselor of the Center for a Strategic and International Studies, and a member of the Advisory Board of The Center for the National Interest in Washington and the Advisory Board of Gatestone Institute in New York.

Image: Reuters