After the attacks of Sept. 11, 2001, the United States invaded Afghanistan and removed the Taliban from power, thereby eliminating a key nexus of international terrorism. But now, a war-weary U.S., with a president seeking to cut and run, has reached a tentative deal largely on the Taliban's terms. The extremist militia that once harbored al-Qaida and now carries out the world's deadliest terrorist attacks has secured not just the promise of a U.S. military exit within 18 months, but also a pathway to power in Kabul.

History is repeating itself. The U.S. is once again abandoning war-ravaged Afghanistan, just as it did three decades ago following a successful covert operation by the CIA to force the Soviets out of the country. The U.S., desperate to end its longest-ever war, appears to have forgotten a key lesson of that earlier abandonment: It turned Afghanistan into a citadel of transnational terrorism, leading to civil war and eventually bloodshed in the West.

The accord reached between the Taliban and the U.S. Special Representative for Afghanistan Reconciliation, Zalmay Khalilzad, reads like a wholesale capitulation on the part of the Trump administration. In 2014, the U.S. signed a security pact with the Afghan government that granted the Americans access to nine military bases at least until 2024. But the U.S. has now agreed to withdraw all of its forces in exchange for a mere promise from a terrorist militia that it will deny other terrorist networks a foothold on Afghan territory. Never mind that the Islamic State is already operational in Afghanistan and poses a challenge to the Taliban itself.