The 10-year occupation left a million Afghans dead and the country in ruins
As Russia marks the 20th anniversary of its withdrawal from Afghanistan, officials in Moscow are warning that US and Nato-led forces are making exactly the same mistakes as the Soviet Union made when it invaded the country in 1979.
The BBC's Richard Galpin has been speaking to experts and veterans, who remember the withdrawal after 10 years of occupation as a traumatic and humiliating experience.
Lt Gen Ruslan Aushev, a Hero of the Soviet Union, sports a moustache that hangs over his mouth like a heavy velvet curtain.
But from the dark morass emerge words of precision and directness that befit a much-decorated commander of the Soviet military venture in Afghanistan in the 1980s.
"We were there for 10 years and we lost more than 14,000 soldiers, but what was the result? Nothing," he tells me as we sit in his office on one of central Moscow's most fashionable streets.
"[After the Soviet withdrawal] there was a second civil war and then the Taleban appeared. We wanted to bring peace and stability to Afghanistan, but in fact everything got worse," he adds.
Such frank admissions of failure are common amongst the Russian veterans who are attending a series of commemorative events this weekend, exactly 20 years after the last Soviet troops left Afghanistan.
Experts say the Soviet government under Leonid Brezhnev had assumed their invasion in December 1979 would bring rapid results, stabilising the fledgling communist government in Kabul and thus ensuring the loyalty of an important neighbouring country at the height of the Cold War.
But instead of being able to leave within six months, the Soviet forces became bogged down in a protracted conflict with a tough and well-armed guerrilla force which received massive assistance from the West and the Muslim world.
Some of the Mujahideen, as the loosely-aligned groups of rebels became known, were radical Islamists for whom the fight against the godless communists was a jihad.
And crucially, the rebels enjoyed the support of the population.
Now just 20 years later, the Russians are looking with astonishment at the way the US and Nato-led forces are waging their war in Afghanistan.
The view from Moscow is that the Western forces have learned nothing from the bitter experience of the Soviet Union.
Instead, they are falling into exactly the same trap.
One prime example is the current plan by the US to send tens of thousands of extra troops.
"Doubling their forces won't lead to a solution on the ground," says Col Oleg Kulakov, who served twice in Afghanistan and is now a lecturer and historian in Moscow.
"The conflict cannot be solved by military means, it's an illusion," he adds.
"No-one can reach any political goal in Afghanistan relying on military force. Frankly speaking, they are doomed to repeat our mistakes."
There are many striking parallels.
Once again, invading foreign forces in Afghanistan are trying to stabilise a foreigner-friendly government.
Once again, they are facing a rebellion by Islamist militants who just happen to have a different generic name this time, "the Taleban".
Once again, the rebellion is growing in strength and has increasing support from the population as the occupation drags on inflicting a mounting number of civilian casualties.
Sir Roderick Braithwaite a former British ambassador to Moscow, fears that the US and Nato-led intervention in Afghanistan could prove to be as disastrous as that of the Soviet Union.
"We went in with a limited objective to start with, but like the Russians hoping that they could build socialism in Afghanistan, we hoped we could build democracy," he says.
"We haven't got enough troops there to dominate the territory and we have a government in Kabul whose authority barely runs inside the capital, let alone outside it."
As in the 1980s, foreign forces are facing a rebellion by Islamist militants
"We have no long-term strategy and unlike the Russians we have been there for eight years without even beginning to plan to leave," he adds.
But other experts are not quite so apocalyptic.
"The mission now is quite different from the Soviet war," says Gregory Feifer, who has just written a book on the Soviet experience in Afghanistan.
"Crucially even seven years into the occupation, there a critical mass of Afghans who still want the mission to succeed... there is still a small window of opportunity left."