After spending billions to help the Taliban beat the Russians, America famously decided it was "game over" in Afghanistan and it no longer needed to pour money into the country.
Former Texas Congressman Charlie Wilson, who had led the drive to fund Russia's enemies thought the Soviet withdrawal, presented a golden opportunity. But his idea of funding education in a largely illiterate nation gained no support it was too expensive.
The Soviets, having lost huge sums of money and large numbers of soldiers fighting what, for them, became an un-winnable war, got out of Afghanistan in a hurry leaving behind a hugely under-resourced government.
The country collapsed into another bloody civil war. The Taliban triumphed with the help of foreign fighters and money and soon became home to al-Qaeda.
Now, 10 years in, the US is convinced the longest war in its history has damaged the Taliban and virtually routed al-Qaeda.
The man who is the military commander there, General John Allen, told Congress as much when he faced the Joint Armed Services Committee in Washington.
"We remain on track to ensure that Afghanistan will no longer be a safe haven for al-Qaeda and will no longer be terrorised by the Taliban,” Allen said.
The idea is that security operations will soon be handed over to Afghan National Security Forces, clearing the way for combat troops from the US and its international allies to leave by the end of 2014.
Allen has had a rocky eight months in command. He’s seen deadly nationwide protests after US servicemen burned copies of Quran and other holy books at their Bagram airbase, and the shooting dead of 16 civilians, allegedly by a deranged staff sergeant who is likely to face trial.
Despite all the problems, he is still well regarded in government circles in Kabul, considered thoughtful, honest and respectful of Afghan and Muslim traditions.
He believes that in the future Afghan forces must take the lead in security operations, saying "In the long run, our goals can only be achieved and then secured by Afghan forces. Transition, then, is the linchpin of our strategy, not merely the ‘way out’.”
Allen has said he is pleased at how good the recruits to the new Afghan National Security Force are, adding that they have also surprised themselves with how good they are.
Initially, there will be 352,000 of the recruits spread around the country. It is steady work in a land with few opportunities. Yet a force that size is expensive and the cost is being met by the US and its allies.
So, after the initial “surge” that will cost around $6bn a year, the plan is to take around 150,000 off the payroll, saving $2bn.
The allies obviously believe that by then, the number will be more than enough to provide protection and security to a government that suddenly has to go it alone without international help.
If the reduction in numbers isn’t handled properly there will be thousands of highly trained but deeply disgruntled people out of a job, a factor the Taliban have been able to exploit in the past. Unless there is some form of political reconciliation, then the danger is that a new insurgency may not be far away.
The US has already witnessed how cutting back can save money. It may help with the bills in the short term, but the long-term costs could be far greater.