From ancient times, the Karabakh region was part of different Azerbaijani States Nagorno-Karabakh (Mountainous Karabakh) forms part of the wider Karabakh region of Azerbaijan. Karabakh, which means ‘black garden’ in Azerbaijani, covers the lands from the Araz River in the south to the Kür River in the north, and from the junction of the Kür and Araz Rivers in the east to the eastern ranges of the Lesser Caucasus in the west.
From antiquity until the Russian occupation, Nagorno-Karabakh was part of different Azerbaijani states. In the middle of the eighteenth century, the Karabakh Khanate was established by Panah-Ali Khan Javanshir, an Azerbaijani nobleman.
The khanate became one of the largest and most important of the Azerbaijani khanates. On the territory of Nagorno-Karabakh arose five melikdoms, each governed by a prince (melik) of Caucasian Albanian origin and subordinate to the khan. To reinforce the power of the khan, the fortress at Şuşa was built in 1751. At the same time, Azerbaijani culture was blossoming in Karabakh, and Şuşa came to be regarded as the cradle of Azerbaijani culture.
Russia began its imperialist expansion into the Caucasus in the eighteenth century, leading to the subjugation of local independent states. Under the 1805 Treaty of Kürəkçay between Ibrahim Khalil Khan, the ruler of Karabakh, and the Tsar’s representative Pavel Tsitsianov, Karabakh came under Russian rule. Karabakh remained an autonomous khanate until 1822, when it was formally turned into a Russian province with a military administration. According to estimates 117,000 Azerbaijani Muslims were living in Karabakh and Yerevan in this decade. The Armenian population in Karabakh constituted only 8.4% of the total in 1823.
After the Russo-Persian war of 1826-1828, the Treaty of Türkmənçay confirmed Russian suzerainty over the region. The Yerevan and Nakhchivan khanates, which had been home to a majority Azerbaijani population, also fell to Russia. Russia attempted to consolidate its control in the Caucasus by a major policy of Christianization and resettlement of Armenians into regions previously dominated by Muslims.
This policy was aimed at ensuring a bridgehead of Russian power at the edge of the Middle East.
Correspondingly, the 1828 Türkmənçay peace treaty provided for a resettlement of Armenians from Persia and the Ottoman Empire to the Russian South. As a result, massive population movements took place across the region, with a strong influx of Armenians into Nagorno-Karabakh and other regions heavily populated by Azerbaijani Turks. An estimated 200,000 Armenians left Persia and the Ottoman Empire, and migrated primarily to Yerevan and Nagorno-Karabakh. 30,000 Armenians settled in Karabakh alone, increasing their share of the population from 8.4% to an estimated 34.8%. In Yerevan the proportion seemed to have increased from 24% to 53.8%. In return 35,000 of the 117,000 Muslims who once lived in Yerevan and Karabakh fled Russian rule.
The population movements in the first half of the 19th century were just the start of Nagorno-Karabakh’s ethnic upheavals. The region was hit by further waves of Armenian immigration in the course of the Russo-Ottoman wars of 1853-1856 and 1876-1878. In return thousands of Muslims left the region.
After the Tsarist Empire collapsed in 1917-1918, the Democratic Republic of Azerbaijan – the world’s first Muslim democracy – was founded, including Nagorno-Karabakh. However the Republic lasted only until 1920 when the Red Army invaded Azerbaijan.
As part of the Azerbaijan SSR, the Armenians in Nagorno-Karabakh enjoyed a strong self-rule. Almost all public offices in Nagorno-Karabakh were held by Armenians and the standard of living there was one of the highest in Azerbaijan. In contrast, the 250,000 Azerbaijanis in Armenia had no self-rule, and the government in Yerevan did its best to get them to emigrate to Azerbaijan.
In 1989, according to the last Soviet census, the population of Nagorno-Karabakh was approximately 190,000. Of this number about 41,000 were Azerbaijanis. The Azerbaijanis lived primarily in Şuşa but also in Xocalı and other towns and villages.