When the Russians pulled out of Afghanistan in 1989, they left behind a government in Kabul which outlasted the Soviet Union, kept Islamist insurgents at bay, and collapsed only after the money ran out.
A similar scenario is taking shape again, only this time -- Western countries hope -- without the money running out.
Analysts say there is little prospect of a political settlement with Taliban insurgents by 2014, when the United States and its allies plan to pull out most combat troops.
Instead, the aim is to leave behind a government strong enough to escape the fate of its Soviet-era predecessor, which collapsed in 1992 in a bitter civil war, and whose president Mohammad Najibullah was eventually captured, tortured and executed by the Taliban when they overran Kabul in 1996.
"Frankly, we don't know whether the insurgents will come to the table," Simon Gass, NATO's senior civilian representative in Kabul, told reporters after a regional conference on Afghanistan in Istanbul last week.
But he acknowledged it might be easier for the Afghan government to negotiate after 2014 when the insurgents -- who say they are fighting to drive foreign troops out of Afghanistan -- might prove more amenable.
"We cannot gamble Afghanistan's future on the willingness of the insurgents to talk peace," he said. There was therefore a "fair-weather strategy" backing an Afghan-led peace process and a "rainy-day strategy" of building up Afghan security forces.
The United States has said it is open to talks with insurgents who are willing to sever ties with al Qaeda, renounce violence and respect the Afghan constitution.
That sentiment was echoed by Afghans at the Istanbul conference, despite intense anger over the assassination in September of Afghan peace negotiator Burhanuddin Rabbani, which Afghanistan says was planned by Pakistan-based insurgents.
"We are ready to talk to everybody, every Afghan citizen if he or she is ready to talk for peace and stability in Afghanistan," Rangeen Dadfar Spanta, national security adviser to President Hamid Karzai, told Reuters.
Several years of contacts have so far led nowhere and Rabbani's murder by a suicide bomber posing as a Taliban peace emissary prompted Karzai to say he would be better off talking directly to Pakistan, where the Taliban leadership is based.
"We cannot keep talking to suicide bombers, therefore we have stopped talking about talking to the Taliban until we have an address for the Taliban," he told a news conference.
But after several meetings in Istanbul between Afghanistan and Pakistan, their first since Rabbani was killed, the two countries are expected to try to pick up the threads of Taliban talks.
On all sides, there is deep scepticism about whether these can be made to work.
The Taliban insurgents themselves are increasingly fragmented, with Pakistan-based leaders sometimes struggling to assert their authority over younger fighters in the field, and divided among themselves on peace talks.
"To my mind, the biggest factor which determines what they are going to do is the internal fragmentation of the movement," said Kandahar-based researcher Alex Strick van Linschoten. "Not only do you have these internal disagreements, but you have this split between the military and the political wings."
And while those on the political wing who favoured talks "don't really seem to have a voice any more", he said, the military wing wanted to delay any official effort at peace-making. "They are opposed to negotiations. They believe they still have command and control. That 'We can win this'."
Pakistan, meanwhile, has suggested Rabbani's assassination could have been carried out by a faction to undercut improving ties between Kabul and Islamabad -- who were beginning to work together earlier this year on bringing insurgents into talks.
Interior Minister Rehman Malik told Reuters it was designed in such a way as to implicate Pakistan and "block the growing relationship between Pakistan and Afghanistan". "Who is getting the benefit of the terror?" he asked. "There are groups within the Taliban who are doing it."
His comments underlined the risk that even if talks do start, those who might lose out from a peace deal -- from gunrunners and drug traffickers to ambitious local commanders -- could sabotage the process through assassinations and attacks.
Diplomats stress, however, that they are not ruling out the possibility of a settlement before 2014, however unlikely.
The conference in Istanbul attended by regional powers including Russia, Iran, India, China and Pakistan, promised to support Afghan-led reconciliation. In a statement, participants also committed to a process of "dismantling terrorist sanctuaries and safe havens, disrupting all financial and tactical support for terrorism".
CHINA'S GROWING ROLE
Pakistan, under pressure to curb insurgents using its territory as a safe haven, is itself keen to get talks up and running again so it can deal with Pakistani Taliban militants challenging the Pakistani state.
And China, which Pakistan considers its most reliable ally, is taking an increasingly active role in Afghan diplomacy and could succeed where Washington has failed in convincing Islamabad to try to persuade insurgents to negotiate.
"I don't think they're under any illusions about Afghanistan achieving stability," said Andrew Small, a China specialist at the German Marshall Fund of the United States. "I just think they want to ensure that instability is at manageable levels and that they can protect their economic projects."
He added that while the Chinese shared some interests with Pakistan in limiting Indian influence in Afghanistan, "beyond that I think there's clear daylight between China and Pakistan". "They don't want to see a repeat of the 1990s and will not be sympathetic if Pakistan attempts to bring it about."
The next steps in the talks process are hazy.
Afghans in Istanbul stressed their priority was in seeking help from Pakistan to investigate Rabbani's assassination.
Plans long-floated for setting up a Taliban office, possibly in the Gulf, have been shelved for this year, diplomats said.
Pakistan, meanwhile, says it is looking for a roadmap on where negotiations are meant to lead.
So far several years of diplomatic contacts appear have done little to bridge the gap between the Taliban's view of itself as a religious movement and a Western offer that they could return home, form a political party and contest elections.
The Taliban have always publicly rejected peace talks until foreign troops leave, though Strick van Linschoten said some had seen negotiations as a means of reclaiming the authority undermined by them trying to run their campaign from Pakistan.
But he said: "All the people who were trying to put the political line, it seems that their influence has been curtailed to the point that they don't have it any more."
In the meantime, the United States and its allies are building up the Afghan army and seeking promises of financial support to the Afghan economy well beyond 2014 to try to ensure it can hold its own after foreign combat troops leave.