In order to get precise information about the ethnic composition of the Nagorno-Karabakh region during the Soviet era, it is extremely important to first understand the ethnic and political situation in the region before the establishment of the Nagorno-Karabakh Autonomous Oblast on July 7, 1923. According to the Tsarist Empire’s 1916 census, there were 171,954 people in the Shusha uyezd, 77,189 of them ethnic Azerbaijanis and the remaining 94.785 ethnic Armenians. However, the number of ethnic Azerbaijanis declined in the following years, as a result of Armenian terrorism against the local Muslim population in the region. Thus, when Vladimir Ilich Lenin withdrew Russia from the First World War after the Bolshevik Revolution in October 1917, the Armenian military units that were released from the Tsarist Empire’s military forces began to attack Azerbaijan, as well as Karabakh, with a view to wiping out the Azerbaijani population in the region and annexing it to the newly created ’Ararat Republic’. As a result, Armenia completely wiped out the population of the 150 Azerbaijani villages in the Karabakh region in 1918-1919.
In those times of hardship, the military support provided by the Ottoman Empire made it possible to prevent Armenian atrocities in some regions of Azerbaijan. The Islamic Army of the Caucasus, which was formed from the joint military forces of the Ottoman Empire and Azerbaijan, liberated all Azerbaijan as it marched from Ganja to Baku. On September 15, Baku was liberated from the Dashnak-Bolshevik forces, and by October Shusha and the whole of Karabakh were completely in the hands of the Islamic Army of the Caucasus. Although this army managed to take control of the region, many ethnic Azerbaijanis in Karabakh were either deported or killed by Armenians at that time.
After Azerbaijan was occupied by the Red Army in April 1920, the territorial claims over Azerbaijan by Armenian nationalists took on a new form. The pro-Armenian policy of Sergei Mironovich Kirov, First Secretary to the Central Committee of the Communist Party of Azerbaijan between 1921-1925, inspired Armenians and changed the administrative and political situation in the region. For the first time in the history of Karabakh, the notions of Upper (Mountain/Nagorno) Karabakh and Lower Karabakh were used. Thus, Kavbureau CC RCP (b) decided to give Nagorno-Karabakh autonomous status within the Azerbaijan SSR, and on July 7, 1923, the Azerbaijan Central Executive Soviet Committee passed a decree authorizing the establishment of the Nagorno-Karabakh Autonomous Oblast (NKAO) as a constituent part of the Azerbaijan SSR. The formation of the NKAO paved the way for further settlement and the number of Armenians in the region thus rose, changing the demographic situation in favour of Armenians, as had been the case during the time of the Tsarist Empire. Hence, according to the Soviet Union population census of 1926, the NKAO had a total population of 125,300, 111,700 (89%) of whom were ethnic Armenians and 12,600 (11%) were ethnic Azerbaijanis. Because of this demographic change, the national-cultural values of the region were absorbed, place names and historical names were changed to Armenian ones, and the headquarters of the NKAO were moved from Shusha to Khankendi, which was renamed as Stepanakert, in the honor of Stefan Schaumian.
Turning to the ethnic composition of Nagorno-Karabakh during first two decades of the Soviet era, the Armenian population had risen by 2.6% by 1939, as a result of Armenians being appointed to many high-level government posts in the Azerbaijan SSR and because of anti-Azerbaijan activities and campaigns by those Armenians. Thus, since the Soviet leadership distrusted the Azerbaijani population because of their ethnic kinship with Turkey, as relations between Turkey and the Soviet Union escalated in the late 1930s, hundreds of Azerbaijani families were displaced from Nagorno-Karabakh in 1937-1938 and Armenian families from the Armenian SSR were settled in the region.
During the Second World War, the population of Azerbaijan and the Armenian population of Nagorno-Karabakh both declined, due to the catastrophic nature of the war. According to the 1959 population census, the Armenian population of Nagorno-Karabakh fell to 86% (121,000), while the Azerbaijani population rose to 14%. The changing demographic situation in the region continued in the following two decades as well, in favor of ethnic Azerbaijanis. Thus, according to the 1979 census, the population of Nagorno-Karabakh consisted of 75% ethnic Armenians, 23% ethnic Azerbaijanis, and 2% other ethnic groups. As can be seen from these statistics, the Azerbaijani population of Nagorno-Karabakh had increased to a certain extent, based on the population censuses conducted between 1939 and 1979. However, the number of ethnic Armenians increased yet again towards the end of the Soviet era, since the make-up of the Nagorno-Karabakh population in 1989 was 76.9% (145,500) ethnic Armenians, 21.5% (40,688) ethnic Azerbaijanis, and 1% (1.99) other ethnic groups.
 Mahmudov, Ceyhun, “Karabağ’ın Etnik Yapısının Oluşumuna Tarihsel ve Demografik Bakış”, in Yılmaz, Reha (ed.), Qarabağ bildiklərimiz və bilmədiklərimiz (Qafqaz Universiteti, 2010), p. 566.
 Uçarol, Rifat, Siyasi Tarih (1789-1994) (İstanbul: Filiz yayınevi, 1995), pp. 485-491. See also: Erməni terroru və quldur birləşmələrinin bəşəriyyətə qarşı cinayətləri (XIX-XX)-Müxtəsər xronoloji ensiklopediya, (Bakı: Azərbaycan Milli Elmlər Akademiyası İnsan Hüquqları İnstitutu, 2003), pp. 42-100.
 Osmanlı Belgelerinde Karabağ, (İstanbul: T.C. Başbakanlık Devlet Arşivleri Genel Müdürlüğü, 2009), pp. 240-241. See also: “Karabağ”, Meydan- Larousse, Büyük lugat ve Ansiklopedi, p. 917. See also: Süleymanov, Mehman, Qafqaz İslam Ordusu və Azərbaycan (Bakı, 1999), pp. 72-83-139. See also: Ağayev, Yusif və Əhmədov, Səbuhi, İstiqlal Yürüşü-1918 (Bakı: Altun Kitab, 2009), pp. 109-167.
 Bakışov, Ç.A., “İzminenniye Etniçeskogo Sostava Naseleniya Azerbaycanskoy SSR (po dannım perepisey 1897-1979 gg.)”, Sovetskoye Etnokrafiya, No. 5, 1980, pp. 66-67.
 Qasımlı, Musa, “Ermənilərin Azərbaycan torpaqlarına yerləşdirilməsi və Dağlıq Qarabağa əsassız iddiaları”, in Yılmaz, Reha (ed.), Qarabağ bildiklərimiz və bilmədiklərimiz (Qafqaz Universiteti, 2010), p. 7.
 Bakışov, “İzminenniye Etniçeskogo Sostava Naseleniya Azerbaycanskoy SSR”, pp. 68-71.
 Baguirov, Adil, “Nagorno-Karabakh: Basis and Reality of Soviet-era Legal and Economic Claims used to Justify the Armenia-Azerbaijan War”, Caucasian Review of International Affairs, Vol. 2, No. 1, 2008, pp. 13-14.