As the Obama administration prepares for the pullout of American forces from Afghanistan by the end of 2014, historians are looking back to the Soviet pullout from Afghanistan in 1989.
There are significant contrasts between the Soviet invasion and that of the United States. But then, like now, exiting proved difficult for similar reasons.
In parts of Afghanistan, robust local government institutions have taken hold. Could these institutions hold the key to a stable future for the country?
David Loyn, the BBC’s international development correspondent, has been reporting from Afghanistan on the run-up to the transition.