MOSCOW — The conflict between Armenia and Azerbaijan in the breakaway region of Nagorno-Karabakh has simmered for decades. It's not an isolated confrontation, however. Any escalation in violence threatens to draw in Turkey and Russia.

What are the roots of the conflict?

In 1988, Nagorno-Karabakh became a flash point within the Soviet Union. With a predominantly ethnic Armenian population, the enclave sought to unite with the then-Soviet republic of Armenia and declared independence from Azerbaijan, another Soviet republic.

In 1992, after the Soviet Union collapsed, a full-scale war broke out between the two new ­countries over control of the mountainous region. Nagorno-Karabakh is located within the internationally recognized borders of Azerbaijan, but is mostly controlled by political factions linked to Armenia.

Between 20,000 and 30,000 people were killed and hundreds of thousands were displaced before a cease-fire was declared in 1994. Since then, there have been periodic skirmishes along the border, including clashes in July that killed at least 16 people.

In a commentary for the Carnegie Moscow Center, analyst Sergei Markedonov wrote that the July fighting was not followed by the typical flurry of diplomacy to tamp down tensions. That raised the prospect of more conflict.

“The ‘Karabakh pendulum’ — when military escalation swings back to rounds of negotiations — seems to have become stuck this time,” Markedonov said.

What is happening now?

Renewed fighting appears to be a carry-over from July, with each side accusing the other of starting it. But regional analysts have suggested that Azerbaijan was the likely instigator, as it is the most unhappy with the current situation and diplomatic logjam.

Azerbaijan could also have been emboldened by support from Turkey. Turkish President Recep Tayyip Erdogan described Armenia as the biggest obstacle to long-term peace in the region during a September address to the United Nations.

"This is not to say that the new escalation was provoked by Turkey, but it undeniably contributed to Azerbaijan's tougher position amid the stalled talks," Markedonov said in his commentary.

The conflict flared up Sept. 27, when at least one Azerbaijani helicopter was shot down. Pro-Armenian officials governing ­Nagorno-Karabakh introduced martial law and total mobilization of its male population. Two days later, in another escalation, Armenia's Defense Ministry said one of its jets had been shot down by a Turkish F-16, which Turkey and Azerbaijan denied.

“We all perceive this as an existential threat to our nation. We basically perceive it as a war that was declared to the Armenian people, and our people are now simply forced to use the right for self-defense,” Armenian Prime Minister Nikol Pashinyan told Russia’s state broadcaster.

Armenia and Azerbaijan have both claimed that the other is using foreign mercenaries.

What is the role of Russia and Turkey?

Russia maintains close ties with both Armenia and Azerbaijan, but it has a military pact with Armenia. Azerbaijan is not part of that alliance, but is backed by NATO member Turkey.

Russia and Turkey are already on opposite sides of two other proxy wars, in Syria and Libya.

So far, Turkey has been the one to more forcefully side with its partner, Azerbaijan, whose defense spending significantly dwarfs Armenia’s.

While Turkish Foreign Minister Mevlut Cavusoglu declared that Turkey was “ready to support Azerbaijan both at the negotiating table and on the battlefield,” according to Turkey’s Anadolu news agency, Moscow has been hesitant to publicly promise military aid to Armenia.

In late September, Kremlin spokesman Dmitry Peskov said, “Any statements on military support or military activity unambiguously add fuel to the fire, and we are categorically opposed to this.”

Russia played a pivotal role in brokering the initial cease-fire in 1994 and helped put an end to four days of fighting in 2016, which killed more than 100 people. France, Russia and the United States have mediated peace efforts, but talks on a possible deal stalled in 2010.

What about negotiations?

In an indication of how Russia could serve as a powerful mediator, both Pashinyan and Azerbaijani President Ilham Aliyev granted interviews to Russian state television in late September.

Both rejected peace talks.

“The Armenian prime minister publicly declares that Karabakh is Armenia, period,” Aliyev said. “In this case, what kind of negotiation process can we talk about?”