Armenians in Azerbaijan (; ) are the Armenians who lived in great numbers in the modern state of Azerbaijan and its precursor, Soviet Azerbaijan. According to the statistics, about 500,000 Armenians lived in Soviet Azerbaijan prior to the outbreak of the First Nagorno-Karabakh War in 1988. Most of the Armenian-Azerbaijanis however had to flee the republic, like Azerbaijanis in Armenia, in the events leading up to the First Nagorno-Karabakh War, a result of the ongoing Armenian-Azerbaijani conflict. Atrocities directed against the Armenian population took place in Sumgait (February 1988), Ganja (Kirovabad, November 1988) and Baku (January 1990). Today the vast majority of Armenians in Azerbaijan live in territory controlled by the break-away region Nagorno-Karabakh which declared its unilateral act of independence in 1991 under the name Nagorno-Karabakh Republic but has not been recognised by any country, including Armenia.
Non-official sources estimate that the number Armenians living on Azerbaijani territory outside Nagorno-Karabakh is around 2,000 to 3,000, and almost exclusively comprises persons married to Azerbaijanis or of mixed Armenian-Azerbaijani descent. The number of Armenians who are likely not married to Azerbaijanis and are not of mixed Armenian-Azerbaijani descent are estimated at 645 (36 men and 609 women) and more than half (378 or 59 per cent of Armenians in Azerbaijan outside Nagorno-Karabakh) live in Baku and the rest in rural areas. They are likely to be the elderly and sick, and probably have no other family members. Armenians in Azerbaijan are at a great risk as long as the Nagorno-Karabakh conflict remains unsettled. In Azerbaijan, the status of Armenians is precarious. Armenian churches remain closed, because of the large emigration of Armenians and fear of Azerbaijani attacks.
History
Armenians in Baku
Armenians in Nagorno-Karabakh
Armenians have lived in the Karabakh region since the period of antiquity. In the beginning of the 2nd century BC. Karabakh became a part of Armenian Kingdom as province of Artsakh. In the 14th century, a local Armenian leadership emerged, consisting of five noble dynasties led by princes, who held the titles of meliks and were referred to as Khamsa (five in Arabic). The Armenian meliks maintained control over the region until the 18th century. In the early 16th century, control of the region passed to the Safavid dynasty, which created the Ganja-Karabakh province (beylerbeydom, bəylərbəylik). Despite these conquests, the population of Upper Karabakh remained largely Armenian.
Karabakh passed to Imperial Russia by the Kurekchay Treaty, signed between the Khan of Karabakh and Tsar Alexander I of Russia in 1805, and later further formalized by the Russo-Persian Treaty of Gulistan in 1813, before the rest of Transcaucasia was incorporated into the Empire in 1828 by the Treaty of Turkmenchay. In 1822, the Karabakh khanate was dissolved, and the area became part of the Elizavetpol Governorate within the Russian Empire.