A peace deal has been agreed between Armenia and Azerbaijan, two former Soviet Union republics in the Caucasus region.
It brings to an end six weeks of fierce fighting in which thousands of people were reported killed and many more displaced.
At the heart of the conflict was the Nagorno-Karabakh region. It is recognised as part of Azerbaijan, but it is controlled by ethnic Armenians.
The two countries fought a bloody war over the region in the late 1980s and early 1990s, and it has been the trigger for further violence in the years since.
The story in 100 words
Nagorno-Karabakh is part of Azerbaijan, but its population is majority Armenian. As the Soviet Union saw increasing tensions in its constituent republics in the 1980s, Nagorno-Karabakh voted to become part of Armenia - sparking a war that stopped with a ceasefire in 1994.
Since then, Nagorno-Karabakh has remained part of Azerbaijan but is controlled by separatist ethnic Armenians backed by the Armenian government. Until recently, negotiations mediated by international powers had failed to deliver a peace agreement.
Armenia is majority Christian while Azerbaijan is majority Muslim. Turkey has close ties to Azerbaijan, while Russia is allied with Armenia - although it also has good relations with Azerbaijan.
The story in 600 words
The Caucasus is 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 became part of the Soviet Union when it formed in the 1920s. Nagorno-Karabakh was an ethnic-majority Armenian region, but the Soviets gave control over the area to Azerbaijani authorities.
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. Most of those displaced in the war were Azerbaijanis.
Armenian forces gained control of Nagorno-Karabakh and areas adjacent to it 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 clashes continued, and a serious flare-up in 2016 saw the deaths of dozens of troops on both sides.
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.
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 had 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 maintained good relations with Azerbaijan.
In 2018, Armenia underwent a peaceful revolution, sweeping long-time ruler Serzh Sargsyan from power. Protest leader Nikol Pashinyan became the prime minister after free elections that year.
Mr Pashinyan agreed with Azerbaijan's President Ilham Aliyev to de-escalate tensions and set up the first military hotline between the two countries.
But in August 2019 Mr Pashinyan told crowds of ethnic Armenians assembled in the main city in Karabakh, Stepanakert, that "Artsakh is Armenia, full stop." Artsakh is the Armenian name for Karabakh. The remarks angered Azerbaijan and were repeatedly condemned by President Aliyev.
Fighting broke out in July this year on the international border between Armenia and Azerbaijan, some 300km (185 miles) away from Nagorno-Karabakh. By the end of the month Turkey's military was taking part in large-scale joint exercises in Azerbaijan.
The latest conflict broke out on 27 September. Armenia said Azerbaijan fired the first shots. Azerbaijan said it was launching a "counter-offensive" in response to Armenian aggression.
Fighting came to an end in November when both sides agreed to sign a Russian-brokered peace deal. Under its terms, Azerbaijan holds on to several areas that it gained control of during the conflict and Armenia will withdraw troops from them. Almost 2,000 Russian peacekeepers will monitor the truce.