Fifteen years ago, the Soviet army pulled out of Afghanistan and handed over to Moscow's chosen leader, Muhammad Najibullah. In February 1989, Boris Gromov, the last Russian soldier in the country, symbolically crossed the iron bridge at Termez over the Amu Darya river and peace was declared.
But of course it was not over. The withdrawal led to a brutal civil war, years of fighting between rival warlords, and the arrival of the Taleban and al Qaeda. In October 2003, there is a disturbing parallel with that other victim of Russian military power, Chechnya. Of course the comparison is far from exact, and Moscow has no intention of letting go of Chechnya altogether. But in one sense the parallel goes very far. Moscow is now subcontracting its war to a local appointee. The role of Najibullah is being assigned to Akhmad Kadyrov, a former rebel commander who has switched sides and was elected "president" of Chechnya in a widely-reviled poll on 5th October. Vladimir Putin is hoping to cut back on Russian troop numbers in time for his own bid to be re-elected president next spring, handing much of the "burden of security" to Kadyrov's loyal police force of 12,000 men. The pro-independence rebels are not defeated, so in effect this means Chechnya is about to have a civil war: very much Afghanistan revisited.
It is worth reflecting on what the consequences of this could be, not only for Chechnya and Russia, but for the wider world. Like Afghanistan, Chechnya has been subjected to the most intense violence over the last nine years. That has created a new generation of young militants, many of whom are turning to radical Islam and taking their violence outside the borders of Chechnya itself, including to Moscow. By unilaterally imposing a local satrap on Chechnya, Moscow has given up hopes of a broad-based political process.
The first Chechen war of 1994-96 was the nastiest of a series of post-Soviet conflicts fought over the division of the spoils of the USSR. Djokhar Dudayev, the Chechen leader who tried to proclaim independence, was a recognisably Soviet figure: a loyal communist and army officer who belatedly discovered nationalism.
What distinguished the first Chechen war from the wars in Tajikistan, Nagorno-Karabakh or Abkhazia was the scale of the violence. It was as though the Russian army unleashed all the destruction in its own country that it had kept pent up during the cold war. The ruins of the city of Grozny - and the thousands of ordinary Russian and Chechen civilians buried under its rubble - are the last testimony to a brutalised Soviet military culture.
The second war, which started in 1999 - and which has claimed the lives of at least 5,000 Russian soldiers, and as many Chechen fighters - has mutated into something just as brutal and more sinister. The first sign of a new kind of conflict came a year ago when a group of masked Chechens seized the theatre showing the Nord-Ost musical in Moscow and took the audience hostage. More than 120 hostages and all the attackers died when Russian special forces stormed the theatre. The young Chechen hostage takers paid awkward homage to the tapes they had seen of Hamas and Islamic Jihad and even gave their own video to Al-Jazeera. They wore masks and headbands with Arabic inscriptions. They talked about martyrdom and - incoherently - about Islam. No post-Soviet nationalists, these, and no sense of a political goal.
Since then, the "Palestinisation" of the Chechen conflict has gathered pace. The radicals have turned to suicide bombings, killing more than 300 civilians, mostly in Chechnya but also at a rock concert in Moscow. In contrast to the Palestinians, Chechnya's suicide bombers have predominantly been young women, who probably had family members killed by the Russians or (though this is harder to prove) were raped by Russian soldiers. And the majority of their victims have also been women, mainly low-level employees of Chechnya's pro-Moscow administration. An old taboo against killing fellow Chechens for fear of blood feuds has now been broken.
President Putin has been successful in keeping Chechnya out of people's consciousness in two ways. First, the Russian media has basically stopped covering the conflict. The other reason, effectively neutralising western criticism, is that Putin presents Chechnya as being a front in the "war on terror" and the battle against Osama Bin Laden. There is now an al Qaeda link in the Chechen conflict. Saudi money and a handful of volunteers have infiltrated Chechnya. The connection, however, is still more ideological than physical. Luckily for the Chechens, the high mountains of the Caucasus prevent all but a handful of volunteers from getting across. Moreover, most Chechens, even those with an abiding hatred of the Russian army, are still loyal to their old Sufi religious practices and hostile to foreign proselytisers. Chechnya remains sui generis.
But Chechnya is slowly corrupting almost every aspect of Russian society. Putin's rolling back of the media, once vibrant under Yeltsin, has been made easier by the "war on terrorism." The Russian army is more criminalised and military reform has been postponed. Officers use the conflict to earn themselves a good pension or to make money from the trade in crude oil, pumped out of a thousand village yards. And as in Afghanistan, the veterans who come back from the war are now criminalised and suffer from alcoholism and drug addiction.
Chechnya has also boxed in Russian politics, providing it with a self-fulfilling threat of terrorism that dictates an authoritarian response. Putin's Russia is less tolerant than was Yeltsin's. One of the most vicious commanders in the most recent campaign, Vladimir Shamanov, has been elected governor of Ulyanovsk province.
Hateful views about Chechens are aired freely. In a recent debate on the BBC central Asian service, I was put up against a Russian MP named Alexei Mitrofanov, who said almost casually, "Putin missed his chance on September 12th 2001. When America was busy he should have wiped Chechnya off the face of the earth."
The tragedy is that Chechnya is now ready for a political process, if someone were willing to initiate one. If anything has changed in the last few years it seems to be that the Chechen population has stopped supporting either side. An opinion poll conducted in May by Grozny University sociologists with the help of a Russian polling company suggests two contrary impulses. After the disastrous experiences of the 1990s, most ordinary Chechens have reportedly given up on the idea of independence. But they also identify the Russian military as by far their biggest everyday problem.
That does suggest a way forward. A "roadmap" for Chechnya should reflect this silent majority, who are powerless in the face of the armed groups and warlords in the republic. To get things moving, the rebels should revoke their claim to independence for Chechnya: with the republic in ruins, the concept is more or less meaningless. In return, Moscow should undertake to invite international observers into Chechnya. That could clear the way for investment and a genuine political process based on Chechnya's traditions of collective decision-making, rather than thuggish leaders like Kadyrov. Chechnya needs many leaders, not one, and is better suited to a parliamentary rather than a presidential system of government.
That process should include anyone who is prepared to accept its rules and to renounce violence. It certainly needs to embrace as many of the moderate pro-independence rebels as possible, such as presidential envoy Akhmed Zakayev, who spent the summer in a London court fighting an attempt to have him extradited to Moscow.
In the end someone must take responsibility for the Chechnya tragedy. Russia is too inclined to amnesia, as the aftermath of its Afghan war shows. But that case is a reminder of what can happen when a country disappears in a black hole of violence.