By Andrew Osborn
(Reuters) - Russian foreign policy hawks savoured chaotic scenes at Kabul airport when U.S. forces quit Afghanistan two years ago. Images of fleeing Armenians at Russia's own peacekeeping base at an airport in Nagorno-Karabakh have been harder for them to watch.
Just as Washington's retreat prompted some Americans to fret over U.S. power and emboldened its foes, the apparent impotence of Russian peacekeepers stationed in Karabakh to prevent Turkish-backed Azerbaijani forces from sweeping in to seize the area by force is awkward for Moscow.
Karabakh, an ethnic Armenian enclave internationally recognised as Azerbaijan but run by a breakaway administration since a war in the early 1990s, is in a corner of the former Soviet Union that Moscow views as its own backyard but where its influence is under pressure from Turkey, Azerbaijan and Iran at a time when it is distracted by its own war in Ukraine.
Russia, which has military facilities, including an airbase, in Armenia, has signalled it has no intention of withdrawing its forces from the South Caucasus, a region crisscrossed with oil and gas pipelines.
But its handling of the Karabakh crisis has forced it into a blame game with Armenia and obliged it to defend its foreign policy in the region.
Hundreds are believed to have been killed in Karabakh in recent days where over 100,000 ethnic Armenian civilians will now have to choose between exile from what they view as their historical homeland or integration into what many of them see as a hostile state despite Azerbaijani assurances.
"The dramatic photos of many frightened people at Stepanakert airport (in Karabakh) are an obvious visual rhyme with the photos of crowds at Kabul airport in 2021," said Alexander Baunov, a former Russian diplomat who is now a senior fellow at the Carnegie think-tank.
"Moscow concluded from the Kabul pictures that America was weak and that the historical chance to deal with Ukraine had come. Who will draw what conclusions from the Karabakh pictures?"
The anger felt by some Russians over what they view as their declining influence in the South Caucasus was amplified by the killing of five Russian peacekeepers in an apparent accident involving Azerbaijani forces.
Photographs of the incident's aftermath posted on social media showed the rear windscreen of the vehicle which the Russian soldiers were travelling in riddled with bullet holes.
"Azerbaijan defeated Karabakh with a clear taste of Russian blood on its lips," wrote Zhivov Z, one of many Russian military bloggers who have come to prominence as commentators on the Ukraine war.
"All those who are now dancing around the Azerbaijani victory - you are dancing on the bodies of Russian officers," he wrote, calling, along with other bloggers, for Moscow to retaliate against Baku.
An outbreak of anti-Russian feeling in Armenia, traditionally one of Russia's closest allies, has made the situation more difficult for Moscow, whose resources and attention are stretched by the war in Ukraine.
Protesters who say they feel betrayed by Russia's failure to stop Azerbaijan have gathered outside the Russian embassy in Yerevan, the Armenian capital, and chanted anti-Russian slogans.
"This is a dangerous tendency," said Sergei Markov, a former Kremlin adviser. "Anti-Russian hysteria is being stoked."
Nikol Pashinyan, Armenia's prime minister, angered Moscow in the run-up to the crisis by saying it had been a mistake to rely solely on Russia to protect his country's security.
Accusing the roughly 2,000 Russian peacekeepers in Karabakh of failing to do their job, he then pointedly held joint military drills with U.S. forces while promising to diversify Yerevan's security partners.
Russia has responded with a damage limitation exercise, blaming the debacle squarely on Pashinyan and accusing him of diplomatic incompetence and ingratitude.
Pashinyan, who came to power on the back of street protests in 2018 that diluted Russian influence, has long been seen by Moscow as too pro-Western. It now accuses him of triggering the crisis by saying - after Russian peacekeepers were deployed to Karabakh in 2020 following Armenia's defeat in a 44-day war - that he recognised Azerbaijan's territorial integrity.
Baku has long argued that Karabakh falls within its own borders, but Karabakh Armenians wanted Pashinyan to recognise their independence and unify them with Armenia.
Some Russian officials such as Dmitry Medvedev, deputy chairman of the Security Council, have signalled they would be happy to see Pashinyan - who is now facing calls from his rivals to resign - toppled.
"Guess what fate awaits him?" Medvedev wrote on Tuesday, the day that Azerbaijan sent its forces into Karabakh, after publishing a list of what he saw as Pashinyan's mistakes, including "flirting with NATO".
Russia may be on the backfoot but it believes Armenia's room for manoeuvre is limited, whoever is in charge.
Margarita Simonyan, one of Russia's most powerful state media managers and herself of Armenian descent, said Moscow should not have to explain its actions in Karabakh to Pashinyan, whom she accused of selling out his own people.
"Russia can get by without Armenia," she wrote. "Armenia cannot get by without Russia."
(Reporting by Andrew Osborn; Editing by Gareth Jones)