STEPANAKERT, Nagorno-Karabakh — As a dilapidated old van pulled up at a hillside checkpoint, an Azerbaijani soldier inside scrubbed furiously at his fogged-up window, then cast a glowering look at an Armenian standing just a few feet away.
Just days before, they were on opposite sides of a bitter war. But now the Russian peacekeeper next to them was in charge. He waved the van through toward Azerbaijani-held territory to the right. The Armenians traveled on to Armenian-controlled land to the left.
The vicious war between Azerbaijan and Armenia over the disputed mountain enclave of Nagorno-Karabakh has settled into a tense truce enforced by heavily armed Russian troops. For Russia, long a provocateur in the broader Caucasus region, the peacemaker role is a switch — a new test and opportunity for a country struggling to maintain its influence in the former Soviet lands.
“They say that things will be OK,” said Svetlana Movsesyan, 67, an ethnic Armenian who remained in the Nagorno-Karabakh capital of Stepanakert, even after narrowly escaping an Azerbaijani strike on the market where she sells dried fruits and honey. “I believe in Vladimir Vladimirovich Putin.”
It was Mr. Putin, the Russian president, who by all accounts stopped the war that killed thousands this fall in the fiercest fighting the southern Caucasus has seen this century. But he did so by departing from the iron-fisted playbook Russia has used in other regional conflicts in the post-Soviet period, when it intervened militarily in Georgia and Ukraine while invading and annexing Crimea.
Those tactics, which helped turn those countries into implacable adversaries, seem to have fallen out of fashion in the Kremlin, which analysts say is increasingly applying a more subtle blend of soft and hard power.
The Kremlin’s lighter touch has been visible in the recent Belarus uprising, where Russia refrained from intervening directly and offered only lukewarm support for President Aleksandr G. Lukashenko, whose violence against protesters was infuriating the population.
In the negotiations to end the recent war, Mr. Putin leaned on the threat of Russia’s military power, forcing concessions from both sides in the conflict but gaining a grudging measure of trust in the rival camps. Russia has a mutual-defense alliance with Armenia, but Mr. Putin insisted it did not apply to Nagorno-Karabakh. He has maintained close personal ties to President Ilham Aliyev of Azerbaijan.
The strategy seems to have paid immediate dividends, providing the Kremlin with a military foothold in the region and welding Armenia firmly into Russia’s sphere of influence, without alienating Azerbaijan.
“This is an opportunity to play the role of peacekeeper in the classical sense,” said Andrei Kortunov, the director general of the Russian International Affairs Council, a research organization close to the Russian government. “I want to hope that we are seeing a learning process and a change in the Russian strategy in the post-Soviet space.”
With Russian support, Armenia had won control of Nagorno-Karabakh, a region of Azerbaijan inhabited by ethnic Armenians, after a yearslong war in the early 1990s that was precipitated by the breakup of the Soviet Union. Armenian forces also captured surrounding districts, expelling more than half a million Azerbaijanis.
After a quarter-century of diplomatic failures, Azerbaijan began an offensive on Sept. 27 to retake the area by force, making rapid gains thanks in part to its sophisticated, Israeli- and Turkish-made drones.
In early November, Azerbaijani troops wrested the mountaintop citadel of Shusha from Armenian control, scaling the wooded slopes and fighting hand-to-hand in close combat through the streets. By Nov. 9, they were pummeling Armenian soldiers along the road to nearby Stepanakert, home to a peacetime population of some 50,000 ethnic Armenians, and an even bigger battle appeared imminent.
Then Mr. Putin, who earlier had tried to broker a cease-fire, stepped in. Azerbaijan that night accidentally shot down a Russian helicopter, potentially giving Moscow a reason to intervene. The Russian president delivered an ultimatum to Mr. Aliyev of Azerbaijan, according to several people briefed on the matter in the country’s capital, Baku: If Azerbaijan did not cease its operations after capturing Shusha, the Russian military would intervene.
The same night, a missile of unknown provenance hit an open area in Baku, without causing any injuries, according to Azerbaijani sources. Some suspected it was a signal from Russia that it was prepared to get involved and had the capacity to inflict significant damage.
Hours later, Mr. Putin announced a peace deal, and Mr. Aliyev went on television to announce that all military operations would stop. Prime Minister Nikol Pashinyan of Armenia said he had no choice but to go along, facing the prospect of even more bloodshed on the battlefield.
Mr. Aliyev cast the deal as a victory, with all but a sliver of what was Armenian-controlled territory in Nagorno-Karabakh being returned to Azerbaijan. But he, too, had to compromise: Nearly 2,000 Russian troops, operating as peacekeepers, would now be stationed on Azerbaijani territory. It was a strategic boon for Russia, giving Moscow a military foothold just north of Iran, but also a risk because it put Russian troops in the middle of one of the world’s most intractable ethnic conflicts.
“I don’t know how it will end this time, because there is no good example of Russian peacekeepers in the Caucasus,” said Azad Isazade, who served in Azerbaijan’s Defense Ministry during the 1990s. “I am worried how it will end.”
Seared in almost every Azerbaijani’s memory are the bloody events of 1990, when Soviet tanks rolled over demonstrators in Baku’s central square. Russian troops have since intervened repeatedly in troubled corners of the Caucasus, often under the moniker of peacekeepers but acting more like an invading army. Now Russia will be pivotal to the future of Nagorno-Karabakh, with the region’s long-term status still unclear.
“Russia doesn’t want to leave this alone. They like this frozen state,” said Farid Shafiyev, a former diplomat and director of the government-financed Center for Analysis of International Relations in Baku. “They are going to meddle.”
But the deal with Mr. Putin appears to have suited Mr. Aliyev — only in part because Azerbaijani forces were already strung out and faced a tougher, wintertime fight ahead while bearing the added burden of managing a hostile ethnic Armenian population, one analyst said.
“I don’t think Aliyev needed much persuading,” Thomas de Waal, a senior fellow with Carnegie Europe, said. “He values his relationship with Russia.”
For Armenians, many of whom had looked to build closer ties to the West in recent years, the war was a harsh reminder that Russia remains critical to their security. Because Azerbaijan’s main ally, Turkey, posed what many Armenians considered to be an existential threat, Armenians have come back “to our default position: the reflexive perception of Russia as the savior,” said Richard Giragosian, a political analyst based in Yerevan, the capital of Armenia.
It was Russia that offered refuge to and fought with Armenians against Ottoman Turkey during the Armenian Genocide that began in 1915.
“Armenia is now ever more firmly locked within the Russian orbit, with limited options and even less room to maneuver,” Mr. Giragosian said. “The future security of Nagorno-Karabakh now depends on Russian peacekeepers, which gives Moscow the leverage they lacked.”
The Nov. 9 peace deal says nothing about the territory’s long-term status, and ethnic Armenians who trickled back to their homes in buses overseen by Russian peacekeepers said they could not imagine life in the region without Russia’s protection.
Down the road from the Stepanakert military college now housing the Russian command, Vladik Khachatryan, 67, an ethnic Armenian, said there was a rumor going around Stepanakert that gave him hope for the future.
“Soon, we will get Russian passports,” he said. “We won’t be able to survive without Russia.”
Across from the Stepanakert market, in Room 6 of Nver Mikaelyan’s hotel, a maroon bloodstain still covered the bedsheets more than a week after the war’s end. The boxers and towels of the room’s last guests hung on the headboards, pierced by shrapnel from the Azerbaijani bomb that hit in October.
Echoing other ethnic Armenians in the area, Mr. Mikaelyan said he saw one clear path to a sustainable peace: Nagorno-Karabakh becoming part of Russia. The idea seems far-fetched, but it has been floated by political figures in Russia and Nagorno-Karabakh over the years, though not by Mr. Putin.
“What else is to be done?” Mr. Mikaelyan asked, after taking another look at the blown-out hotel room door, the TV ripped off the wall, the trails of blood still stuck to the third floor. “The European Union is doing nothing. The Americans are doing nothing.”
Anton Troianovski reported from Stepanakert, Nagorno-Karabakh, and Carlotta Gall from Baku, Azerbaijan.