The Caucasus are a strategically important mountainous region in south-east Europe. For centuries, different powers in the region - both Christian and Muslim - have vied for control there.
Modern-day Armenia and Azerbaijan both became part of the Soviet Union when it was formed in the 1920s. Nagorno-Karabakh was an ethnic-majority Armenian region, but the Soviets gave control over the area to Azerbaijan authorities.
The Armenians in Nagorno-Karabakh made several calls to be transferred to Armenian authority control in the following decades. But it was only as the Soviet Union began to collapse in the late 1980s that Nagorno-Karabakh's regional parliament officially voted to become part of Armenia.
Azerbaijan sought to suppress the separatist movement, while Armenia backed it. This led to ethnic clashes, and - after Armenia and Azerbaijan declared independence from Moscow - a full-scale war.
Tens of thousands died and up to a million were displaced amid reports of ethnic cleansing and massacres committed by both sides.
Armenian forces gained control of Nagorno-Karabakh before a Russian-brokered ceasefire was declared in 1994. After that deal, Nagorno-Karabakh remained part of Azerbaijan, but since then has mostly been governed by a separatist, self-declared republic, run by ethnic Armenians and backed by the Armenian government.
It also established the Nagorno-Karabakh Line of Contact, separating Armenian and Azerbaijan forces.
Peace talks have taken place since then mediated by the Organization for Security and Co-operation in Europe (OSCE) Minsk Group - a body set up in 1992 and chaired by France, Russia and the United States.
But so far a peace treaty has not been signed. Clashes have continued throughout the past three decades, with the last serious flare up in 2016, when dozens of troops on both sides died.
The conflict is further complicated by geopolitics. Nato member-state Turkey was the first nation to recognise Azerbaijan's independence in 1991. Former Azeri President Heydar Aliyev once described the two as "one nation with two states". Both share a Turkic culture and populations, and Turkey's President Recep Tayyip Erdogan has pledged his nation's support for Azerbaijan.
Moreover, Turkey has no official relations with Armenia. In 1993 Turkey shut its border with Armenia in support of Azerbaijan during the war over Nagorno-Karabakh.
Armenia meanwhile has good relations with Russia. There is a Russian military base in Armenia, and both are members of the Collective Security Treaty Organization (CSTO) military alliance. However, President Vladimir Putin also has good relations with Azerbaijan, and Moscow has called for a ceasefire.
In 2018, Armenia underwent a peaceful revolution, sweeping long-time ruler Serzh Sargysan from power. Protest leader Nikol Pashinyan became the prime minister after free elections that year.
Mr Pashinyan agreed with Azerbaijan's President Ilham Aliev to de-escalate tensions and set up the first military hotline between the two countries. In 2019, both nations issued a statement declaring the need for "taking concrete measures to prepare the populations for peace".
As yet however, nothing has come of those words. It is unclear which nations started the latest violence but tensions have been high for months, since clashes in July left casualties on both sides.