40°18′N 45°50′E﻿ / ﻿40.300°N 45.833°E﻿ / 40.300; 45.833
 The Armenia–Azerbaijan border (Armenian: Հայաստան–Ադրբեջան սահման, romanized: Hayastan–Adrbejan sahman, Azerbaijani: Azərbaycan–Ermənistan sərhədi) is the international border between Armenia and Azerbaijan. Estimates of the border's length vary from 996 km (619 mi) to 1,007.1 km (625.8 mi). European routes E002 and E117 cross the border.
 The de jure border follows that of the former Armenian Soviet Socialist Republic and the Azerbaijan Soviet Socialist Republic[citation needed] and consists of two main segments – that between Armenia and Azerbaijan's Nakhchivan exclave in the west, and the longer section between Armenia and 'mainland' Azerbaijan to the east. Additionally, there are a number of enclaves on either side of the boundary, however these no longer exist except in a de jure sense. The border between Armenia and Azerbaijan has been closed since 1991.
 The border starts in the north at the tripoint with Turkey on the Aras river, and proceeds overland in a south-easterly direction along various mountain ridges, such as the Zangezur Mountains, down to the western tripoint with Iran on the Aras. Additionally, the Azerbaijani enclave of Karki/Tigranashen lies just north of the border, however since May 1992, following the First Nagorno-Karabakh War, Karki has been controlled by Armenia, which administers the 19 km2 (7.3 sq mi) territory as part of its Ararat Province.
 The border starts in the north at the tripoint with Georgia and proceeds overland in a broadly south-easterly direction, zigzagging next to and around the Voskepar river, crossing through part of the Joghaz Water Reservoir at the mouth of the Voskepar, and touching the western tip of the Abbasbayli Water Reservoir. It then forms a broad concave arc along the Khndzorut Range and down to the Miapor Range. It  then runs parallel with the eastern shore of Lake Sevan along the Sevan Range, runs south along the Eastern Sevan Range, and then west along the Vardenis Range before turning sharply east, thus creating an Azeri protrusion encompassing Böyük Alagöl lake. It then proceeds southwards, crossing the Aylakh-Lich Lake and Sev Lich State Sanctuary, terminating at the Iranian border on the Aras river. The entire border lies mainly in mountainous terrain, with elevations averaging between 600 m (2,000 ft) and 3,400 m (11,200 ft).
 Additionally, in the northern stretch of the boundary area there are four enclaves – one Armenian (Artsvashen/Başkənd) and three Azerbaijani (Sofulu, Yukhari Askipara/Verin Voskepar and Barxudarlı); since the war all four enclaves are now controlled by their 'host' nation and have for all practices purposes ceased to exist, though they are often depicted on official Armenian and Azerbaijani government maps.
 During the 19th century the Caucasus region was contested between the declining Ottoman Empire, Persia and Russia. Over the span of the 1800s, Russia had pushed south at the expense of the Persian and Ottoman Empires. By the Russo-Persian War (1804–1813) and the subsequent Treaty of Gulistan, Russia acquired the bulk of what is now Azerbaijan and part of what is now Armenian's Syunik Province (historically known as Zangezur). Following the Russo-Persian War (1826–1828) and the Treaty of Turkmenchay Persia was forced to cede Nakhchivan and the rest of what is now Armenia.
 In 1867 Russia organised its Armenian and Azerbaijani territories into the governorates of Erivan, Tiflis, Baku and Elisabethpol. Relations between Armenians and Azerbaijanis in the governorates were often tense, for example in 1905–07 there was an outbreak of ethnic violence which resulted in thousands of deaths.
 Following the Russian Revolution in 1917 the peoples of the southern Caucasus had declared the Transcaucasian Democratic Federative Republic (TDFR) in 1918 and started peace talks with the Ottomans. Internal disagreements led to Georgia leaving the federation in May 1918, followed shortly thereafter by Armenia and Azerbaijan. With the Ottomans having invaded the Caucasus and quickly gained ground, the three new republics were compelled to sign the Treaty of Batum on 4 June 1918, by which they recognised the pre-1878 Ottoman-Russia border, thereby ceding most of Nakhchivan and a considerable part of western Armenia to the Ottomans. Armenia in particular was reeling from the aftermath of the Ottoman-led Armenian genocide, which had resulted in vast numbers of refugees fleeing eastern Turkey. The borders between the three new republics were all disputed. War broke out between Armenia and Azerbaijan over disputed territories along the frontier, lasting from 1918 to 1920, focussing on the disputed areas of Nakhchivan (under the control of the short-lived 'Republic of Aras'), Zangezur and Nagorno-Karabakh.
 In April 1920 Russia's Red Army invaded Azerbaijan and Armenia, ending the independence of both, followed in February–March 1921 by Georgia. Fighting continued however in Zangezur, where Armenian forces declared a Republic of Mountainous Armenia and continued to fight against the Bolsheviks until their defeat in July 1921. The Soviet Kavbiuro was tasked with drawing borders between the three former republics in the Caucasus. Armenian control of Zangezur was confirmed in late 1920. In March 1921 Nakhchivan, despite having earlier being promised to Armenia, was allotted to Azerbaijan, partly at the insistence of the new Republic of Turkey via the Treaty of Moscow. On 3 June 1921 the Kavbiuro decided that Nagorno-Karabakh would be included within Armenia, however disputes between the Armenian and Azerbaijani delegates over the issues continued. On 4 July a final Kavbiuro meeting took place to settle the issue, which confirmed the earlier decision to include Nagorno-Karabakh within Armenia. However the next day this decision was reversed and it was granted to Azerbaijan on the proviso that it was granted autonomous oblast status. The precise reasons for the sudden volte-face remain unclear: some scholars think that Joseph Stalin influenced the decision, whereas others (such as Arsène Saparov) point to the fact that the final meeting coincided with Soviet victory in Zangezur and the defeat of the Republic of Mountainous Armenia, after which the Azerbaijanis were able to press their claims more forcefully and the Soviets had little incentive to appease the Armenian side. In 1922 all three states were incorporated into the Transcaucasian SFSR within the USSR, before being separated in 1936. From 1923 to 1929 the strip of land in Azerbaijan between Nagorno-Karabakh and Armenia was designated as the Kurdistansky Uyezd, known colloquially as Red Kurdistan, later renamed the Kurdistan okrug, and then dissolved in 1930.
 The Azerbaijani officials were deeply reluctant to grant Nagorno-Karabakh autonomous status, and thereafter dragged their feet. They proposed instead to create a larger Karabakh oblast encompassing both lowland and highland areas, which would thereby dilute the Armenian majority in the highland areas. The Armenians raised the slow progress with Soviet authorities, who in turn pressured the Azerbaijanis to press on with the creation of the autonomous oblast.  On 7 July 1923 they duly announced that a Nagorno-Karabakh Autonomous Oblast (NKAO) was to be formed. An initial border was decided upon in July 1923, with amendments made later in the same month so as to include Shusha and the Khonashen (Martuni) and Skobolevskoe lowland regions within the NKAO. The issue dragged on into the following year, with a final announcement of the NKAO's borders not being published until 26 November 1924. The boundary thus announced was not a formal, demarcated line as such, but rather a list of the 201 villages which were to be included within the NKAO. The border was then changed again in 1925 so as to include more villages in the NKAO. The boundary that thus emerged used at times geographic and pre-existing administrative lines, but was predominantly based on ethnographic factors.
 Over the following decades Armenia pressed for the inclusion of NKAO within the Armenian SSR, notably in the post-Second World War period when the USSR was pushing its territorial claims against Turkey (later dropped) and again in 1960 following the transfer of Crimea from Russia to Ukraine. In 1965 large protests took place in Yerevan calling for greater recognition of the Armenian genocide, with many also calling for the transfer of NKAO to Armenia. Allegations of discrimination against Armenians in the NKAO by Azerbaijan's government continued, with many claiming that Azerbaijanis were being encouraged to move so as to alter the demographic balance in their favour. Mikhail Gorbechev’s announcement of glasnost and perestroika in 1987 allowed these frustrations to be publicly vented, and Armenians began openly pressing for the transfer of NKAO to Armenia. Protests escalated throughout 1988 with increasingly violence, culminating in the Sumgait pogrom in which 32 Armenians were killed. The violence caught Moscow unawares – they introduced direct rule in January 1989, and sent in troops to Azerbaijan in 1990 following further violence.
 The boundary became an international frontier in 1991 following the dissolution of the Soviet Union and the declaration of independence by Armenia, Azerbaijan and Nagorno-Karabakh in 1991. Azerbaijan abolished the NKAO, sparking a full-scale war with Armenia. The war ended in a ceasefire in 1994. This left Armenia in control of the vast majority of Nagorno-Karabakh, organised as the Republic of Artsakh, and much of Azerbaijan proper, including the strategically vital Lachin Corridor. Since then the conflict has remained frozen, creating the modern de facto border between the two countries which follows the de jure Soviet-era border only in its northern half. Since the ceasefire relations between the two countries remain extremely tense and there have been numerous flare-ups of fighting along the border, notably in 2008, 2010, 2012, 2014, 2016, 2018, and a war in 2020. While the border has not been formally demarcated, both sides agree it should be based on Soviet maps.
 As noted, the de jure border follows that of the former Armenian Soviet Socialist Republic and the Azerbaijan Soviet Socialist Republic[citation needed] and consists of two main segments – that between Armenia and Azerbaijan's Nakhchivan exclave in the west, and the longer section between Armenia and 'mainland' Azerbaijan to the east. As also noted, there are a number of enclaves on either side of the boundary, however these no longer exist except in de jure sense. For nearly 30 years until the conclusion of the 2020 Karabakh war the de facto situation was more complex – the western Nakhchivan segment of the boundary was not disputed (minus the Karki/Tigranashen enclave). However the eastern segment was. From the conflict over Nagorno-Karabakh in the 1990s until late 2020, the de jure eastern border held only in the north, with the southern section of the border being formed by a 'Line of Contact' that ran deep into Azerbaijani territory, encompassing not only most of Nagorno-Karabakh but large parts of Azerbaijan proper; Armenia organised this territory into the self-declared Republic of Artsakh, with the border between Armenia and Artsakh running along the de jure Armenia–Azerbaijan border. In late 2020 Azerbaijan took back the occupied territory and parts of Nagorno-Karabakh, with Russian forces stationed in the Lachin corridor connecting Karabakh to Armenia proper.
 Until mid 2020, the de facto border followed the de jure border southwards from the Georgian tripoint down to Mount Hinaldag. From there the 'Line of Contact' then formed the Armenia–Azerbaijan border for all practical purposes; it proceeded eastwards along the Murovdag mountains, turning south-eastwards near the village of Talish, and continued down to the Iranian border on the Aras river. The area west of this line was organised into the Republic of Artsakh, a self-declared state recognised only by a handful of other non-sovereign entities, functioning effectively as a semi-autonomous part of Armenia. The southern half of the de jure Armenia–Azerbaijan border was during the period retained as the Armenia-Artsakh border. Artsakh encompassed most of the territory of the former Nagorno-Karabakh Autonomous Oblast within Azerbaijan (except for some small areas on its northern and eastern edges), as well as large parts of adjacent Azerbaijani territory.
 The border is closed and the area heavily militarised. Since the conclusion of the 2020 Nagorno-Karabakh war, there is no longer any border between Armenia and Artsakh. However, a landbridge between the two is provided by Azerbaijan under the terms of the 2020 armistice agreement. This is provided via a 5 km (3 mile) wide piece of territory called the Lachin corridor which is under the control of a Russian peacekeeping mission.
 The main highway between northern and southern Armenia runs along the border, even crossing it in multiple locations. During the Soviet period and following the First Nagorno-Karabakh War, the highway was not affected by this. However, following the Second Nagorno-Karabakh War, Azerbaijan regained control of some sectors of the road. While the road has for the most part been left open for Armenian traffic, Azerbaijan closed its sections of the road for 48 hours in August 2021. Russian peacekeepers are stationed along the border in these areas. Armenia is constructing a new road further into its territory.