MOSCOW — Nagorno-Karabakh's war is over for now under a Moscow-brokered peace deal, and its costs are still being counted.

They are tallied, bit by bit, in videos of the bodies of dozens of Armenian soldiers killed in a roadside ambush, and in the TikTok clips posted by Azerbaijani soldiers showing them sifting through the abandoned houses of ethnic Armenians, lingering on old family photographs, clothing, scattered coins and neat glass cabinets with bottles of Armenian cognac.

The stocktaking also brings another new element: how Russian President Vladimir Putin has emerged as the key power broker in a more than 30-year-old conflict dating back to the Soviet era. Under the cease-fire, nearly 2,000 peacekeepers have been deployed to Nagorno-Karabakh, a separatist enclave controlled by an ethnic Armenian government within the internationally recognized borders of Azerbaijan.

The Russian military presence reinforces the Kremlin’s view that its sphere of influence includes Azerbaijan and Armenia, both former Soviet countries. It also is another counterweight to geopolitical rival, Turkey, a close Azerbaijan ally and key customer for its Caspian Sea oil and gas.

Turkey’s support for Azerbaijan in the Nagorno-Karabakh war proved decisive, but Putin managed to block Turkey’s ambitions to send its own peacekeepers to Nagorno-Karabakh. Turkey will instead send peacekeepers to Azerbaijan to take part in a monitoring center jointly with Russia.

“What Russia did was codify victories on the ground,” said Michael McFaul, director of Stanford University’s Freeman Spogli Institute for International Studies.

“Whether you like it or not, this agreement is a real diplomatic victory for Vladimir Putin and allows him to play the role of peacemaker,” McFaul said. “It’s the reassertion of what Putin and the folks around him have dreamed about for 20 years of being the regional hegemon.”

Shaky truce

But the deal does not solve the issue that triggered the 1990s war: the status of Nagorno-Karabakh. Without a comprehensive peace pact, the truce may not hold in the long term, analysts warn.

Russia is no stranger to conflict zones with military forces in Syria and support for pro-Moscow separatists in eastern Ukraine. In Libya, Russian mercenaries fought alongside renegade Libyan commander Khalifa Hifter.

But Nagorno-Karabakh, and its potential shaky truce, presents particular perils. Maintaining peacekeepers for years is a potentially expensive and risky undertaking — underscoring the premium Russia places on influence over both Armenia and Azerbaijan.

“I would hesitate to call it a peace deal,” said Laurence Broers, expert on the Caucasus region at London-based think tank Chatham House, referring to Putin’s sparse nine-point agreement. “The issue of Nagorno-Karabakh, the original issue that is contested between the sides, isn’t even mentioned in the document. So it’s not really a basis for a long-term resolution of the conflict. It’s more like a kind of holding pattern.”

A decades-long peace process collapsed in September as Azerbaijan, supported by Turkey, retook swaths of territory it lost in a humiliating defeat by Armenia in the 1988-94 war.

The final Nov. 10 deal cemented Azerbaijan’s military gains, including around 40 percent of Nagorno-Karabakh and several regions next to the enclave, and saw that Armenia agreed to withdraw from other adjacent regions. On Friday, Azerbaijan’s president, Ilham Aliyev, said his country’s forces had taken control of key parts of the former Armenian-held territory.

Nagorno-Karabakh’s security relies solely on the presence of Russian peacekeepers, but remains precarious since Azerbaijan can veto their presence after five years. (Armenia also has a veto right.)

Russian state TV conveyed the message that its peacekeepers were heroically coming to the rescue of Karabakh’s ethnic Armenians. But it also sent a chilling message about Armenia’s Velvet Revolution of 2018, which propelled Prime Minister Nikol Pashinyan to power. Pashinyan removed several pro-Moscow security chiefs and tried to balance Russia’s influence by fostering closer ties with Europe.

It was exactly the kind of “color revolution” in the former Soviet sphere — like Ukraine’s Orange Revolution 15 years ago followed by its Maidan Revolution in 2014 — that worries authoritarian Moscow. Pashinyan was seen by Moscow as a reckless upstart.

“The Armenians have been playing, especially after the revolution of 2018, this very careful game of thinking that they had both the Russians and the Americans on their side,” McFaul said. “And when push comes to shove they had neither.”

The none-too-subtle message on Russian state television has been that Pashinyan led his nation to catastrophe by playing footsie with the West.

“Here is what happens when a nonsystem oppositionist supported by the American Embassy gains power,” military analyst Igor Korotchenko said on Russian state TV. “A color revolution never brings benefits anywhere, in any country. Color revolutions lead to the collapse of the state. And this is a lesson for all post-Soviet territories.”

He added that “everything will be good” for neighbors who maintain close political and military relations with Moscow, not the West. The message was echoed by several state TV anchors.

'United States was AWOL'

The six-week war flipped Armenia’s 1994 military victory over Azerbaijan — and now leaves Armenia weakened in any future negotiations on Nagorno-Karabakh.

Azerbaijan’s Aliyev, meanwhile, is crowing that military action won what a peace process launched in 1992 led by Russia, the United States and France (known as the Minsk Group) failed to deliver.

But the outrage and resentment in Armenia will simmer for years to come, a source of further instability. Armenian opposition parties have threatened to try to retreat from the deal, albeit unrealistically.

Putin told Russia-24 state television Tuesday that would be “suicidal.”

He said that Nagorno-Karabakh’s status could be settled “if relations between Armenia and Azerbaijan are restored, including between the peoples at the social level,” something unlikely to happen without intensive peace talks.

Aliyev has ruled out autonomous status for the enclave, underscoring the potential for future conflict. Armenia faces steep costs to rebuild infrastructure in Nagorno-Karabakh and is unlikely to catch up with Azerbaijan’s Caspian oil-fueled military superiority any time soon.

“The long-term goal for Russia is to maintain influence over both Armenia and Azerbaijan,” said Broers at Chatham House. But he said Russia must juggle its relations with the two — a delicate, high-maintenance job if Moscow is to prevent future conflict.

Putin’s swift diplomacy and rapid troop deployment also locked out Minsk Group co-chairs Washington and Paris.

“What was striking to me was the Minsk Group was completely AWOL. There was nothing there,” said McFaul, who served as U.S. ambassador to Moscow under President Barack Obama. “And that to me means first and foremost the United States was AWOL.”

“If you look at Central Asia, if you look at the Caucasus, if you look at Belarus, there’s just not a lot of American presence,” he continued. “We don’t have a lot of leverage in any of those places but what leverage we do have the Trump administration’s chosen not to use.”

Recent days have underscored the bitterness between the parties. Armenians vacating their houses on territories that will soon return to Azerbaijani control have burned their homes and chopped down trees, in an effort to leave nothing behind.

Azerbaijanis returning to their former homes have found houses and graveyards destroyed.

“And this shows how hard it is to implement this kind of agreement, when you’ve got absolutely zero trust between the parties,” Broers said.