MOSCOW -- Soviet authorities themselves condemned the USSR's bloody occupation of Afghanistan, but 30 years later some in Russian President Vladimir Putin's government are coming to see the operation in a more positive light.
After a decade of military intervention to bolster Kabul's embattled communist government against Islamist fighters, the USSR finally pulled out its last units on February 15, 1989.
The withdrawal, ordered by Soviet leader Mikhail Gorbachev, was a humiliating defeat for the USSR and helped lead to its collapse.
In 1996, the Taliban took Kabul, beginning a five-year reign of terror.
Mikhail Kozhukhov, who covered the conflict as a correspondent for the Komsomolskaya Pravda newspaper, remembered how the final Russian troops left without joy or bitterness.
"The soldiers were dreaming only of one thing: getting home safe and sound," Kozhukhov, now 62, told AFP.
More than 14,000 Soviet soldiers and more than one million Afghans were killed in the war.
The Soviet troops who died included 366 Tajiks and more than 1,500 Uzbeks, according to the governments of their future countries.
"The intervention in Afghanistan was always a tragic and senseless escapade," said Kozhukhov, who served as Putin's press secretary in 1999 and 2000.
'Russia reviving Soviet past'
The intervention was extremely unpopular with the Soviet public and drew official condemnation in 1989 at the height of Gorbachev's policy of "glasnost", or transparency.
But this judgment is now being reassessed, under pressure from veterans.
Putin in 2015 appeared to back the intervention, saying that the Soviet leadership was trying to confront "real threats" even though he acknowledged "there were many mistakes".
In late January, Russia's parliamentary defence committee backed a draft resolution saying that Soviet troops helped the Afghan authorities fight "terrorist and extremist groups".
The draft resolution, however, has yet to be voted on in full session, reflecting the authorities' reluctance to formally revisit this traumatic episode.
Amid heightened tensions with Western powers in recent years, "Russia is reviving its Soviet past to justify its new opposition to the West," said Irina Shcherbakova, a founding member of Memorial, a Russian human rights organisation.
Kremlin insiders and some veterans of the war are attempting to spin history and turn the focus on the US military's involvement in Afghanistan.
"We have nothing to apologise for," said political analyst Pyotr Akopov of the pro-Kremlin website Vzglyad.
Alexander Kovalyov, chairman of the Commonwealth of Independent States' association of Soviet veterans of the Afghan war, also insists the Soviet invasion was justified.
"Without our troops, the Americans would have installed their missiles to target Moscow," he said.
Afghanistan's defeat of Soviet troops still evokes immense pride among the mujahideen who fought them.
"Nine times they tried [to take the Panjshir Valley], and nine times they failed," boasted one former mujahid, who asked not to be named because he is now an Afghan police commander.
"Of course we celebrated, like all countries celebrate their great victories," he told AFP. "But always I remember those we lost. I cannot forget."
The victory was bittersweet: it failed to deliver the lasting peace that has eluded Afghanistan for four decades.
"After the Russians left, we were sure peace was coming. But our neighbours, and regional powers, had their own agendas," said Wali Mohammad, 52, who joined the mujahideen when he was just 14 years old.
"We were happy that one enemy had left, but we also knew that war was not over," Abdul Karim, another former teenage mujahideen fighter, told AFP in Panjshir Valley, where the Red Army was bled into retreat.
Overlooking a sweeping ravine, the corroded hulk of a Russian troop carrier lies semi-submerged in snow, spray-painted with a rousing slogan: "Long live Afghanistan. Death to the Taliban".
Panjshir, with its fierce warriors and natural defences, was largely spared the violence that plagued Afghanistan after the Soviet expulsion and remains one of its most peaceful provinces.
A violent legacy
Still, some worry history could repeat itself as the US government leads efforts to broker peace between the Afghan government and the Taliban.
The mujahideen understood that without a solid plan once the enemy leaves "the inferno of violence that follows might be much worse", said Graeme Smith, a consultant on Afghan affairs for the International Crisis Group.
"They remember the brutal civil war of the early 1990s, and they don't want to repeat that," he told AFP.
Sitting atop a Russian tank abandoned on the roadside, former mujahideen fighter Mohammad Mirza bitterly recalled the violent legacy that trailed the vanquished Soviets.
"The day they left was both a sad and happy day for us," he told AFP. "We fear the same thing could happen again."
US Special Representative for Afghanistan Reconciliation Zalmay Khalilzad has repeatedly stressed the United States will not leave Afghanistan without enforcement mechanisms in place to ensure Afghanistan does not become a jihadist safe haven.
"Our vision long term is for an Afghanistan that's entirely sovereign, independent," he said February 8. "If they decide that they don't want to have foreign troops, we don't want to stay where we are not wanted -- provided that there is no threat to our national security from Afghanistan."
"That is a red line," he said.