Moving from the lengthy U.S. military presence to full Afghan sovereignty was premised on the completion of four distinct transitions. But none has been successfully carried out, despite more than $640 billion in U.S. direct spending in Afghanistan between 2002 and 2013.

The most critical transition, the one on which everything else rested, was political. Rather than build state institutions or carry out much-needed electoral reforms, President Hamid Karzai spent his long tenure encouraging a form of crony politics that failed to sap the power of the warlords. He won a second term in 2009, after a vastly fraudulent election. The following year, according to U.N. officials, he asked that the United Nations stop supervising elections in the country, and Washington and NATO went along.

The second promised transition was military. U.S. forces were to hand over security matters to Afghan forces, proving that the new, U.S.-trained Afghan Army would then be able to hold back the Taliban on its own. Yet Interior Minister Mohammad Omar Daudzai told Parliament in Kabul on Sept. 16 that the previous six months had been the deadliest ever for the Afghan police. Today there is fighting in 18 of 34 provinces, Afghan and NATO officials have told me. In many areas, Afghan soldiers are barely able to secure their own bases, much less retake lost territory. Helmand, the critical drugs-producing province in southern Afghanistan, is at risk of being taken over by the Taliban. If it falls, all of southern Afghanistan might too.

The third failed transition has to do with economics. According to a senior Afghan official at the Finance Ministry, The Washington Post reported recently, the Afghan government is broke and needs an emergency $537 million bailout; it was barely able to pay more than half a million government employees this month. Money spent on schools and hospitals has dramatically improved education and health for Afghans, but these services remain dependent on foreign funding. There has been little large-scale investment in agriculture or basic industry; instead, the bulk of the economy has focused on servicing foreign troops and on their spending. And now the troops are about to withdraw.

When I first visited Afghanistan in the 1970s, the country was desperately poor, but it was almost self-sufficient in food and had a small yet thriving export trade in fruit, handicrafts, furs and gems. Today, Afghanistan imports much of its food and it produces very few commercial goods. The service economy, which is run by the middle class, has been collapsing, as both educated people and billions of dollars in capital have left the country. The resulting vacuum opens the way for the opium-fed underground economy to expand enormously, breeding crime and corruption.