TVER, Russia — Prime Minister Nikol Pashinyan of Armenia signed on Monday a Russian-brokered settlement to end the war in Nagorno-Karabakh, surrendering disputed territory and bowing to other demands as he faced a battlefield defeat.

The agreement signed by President Vladimir Putin of Russia, President Ilham Aliyev of Azerbaijan and Pashinyan calls for Armenia’s army to withdraw from the Nagorno-Karabakh region and to be replaced by Russian peacekeepers.

Under the deal, the warring sides were to halt fighting and prepare for the peacekeepers’ arrival. Three earlier cease-fires, negotiated by Russia, France and the United States, have collapsed.

But the agreement Monday suggested a more permanent, sweeping redrawing of the security map of the southern Caucasus, a volatile region wedged between Turkey, Russia and Iran. The settlement sealed a role in the region for an increasingly assertive Turkey, which backed Azerbaijan in the war that began in September.

“I personally made a very hard decision for me and all of us,” Pashinyan wrote in a statement announcing the agreement. “It’s not a victory, but there’s no defeat.”

Indeed, the agreement ends a quarter century of Armenian military control over the remote, mountainous region that is a touchstone of Armenian national identity. Russia will now guard the borders.

Advertising

The Nagorno-Karabakh region has a mostly Armenian population but it fell within the Soviet-drawn borders of Azerbaijan. The enclave declared independence before the Soviet breakup.

For the Azerbaijanis, the settlement opens the prospect that at least some of the hundreds of thousands of internally displaced people who lost their homes in a separatist war that ended in 1994 could return to the region. That war ended with the shoe on the other foot: a cease-fire seen as catastrophic but inevitable for Azerbaijan after Armenian military victories.

Putin said the new agreement requires both the Armenian and Azerbaijani armies to stop at their currently occupied positions. That cements in place the Azerbaijani capture on Sunday of a strategic town, known as Shusha to Azerbaijanis and Shushi to Armenians.

“I made the decision as a result of a deep analysis of the military situation,” Pashinyan wrote. He said the deal was “the best solution in the situation.”