Karabakh was one of the regions that played an important role in the history of Azerbaijani states throughout history before the Safavid Empire was formed. It has been part of Azerbaijani states such as the Sajjids (879-941) and Sallarids (941-981) in the ninth and tenth centuries, the Shaddadids (971-1088) and the Great Seljuqs in the eleventh and twelfth centuries, the Eldiguzids-Atabegs of Azerbaijan (1136-1225) in the twelfth and thirteenth centuries, the Ilkhanate (1256-1357) from the second half of the thirteenth to the mid-fourteenth century, the Jalayirids (1359-1410) in the second half of the fourteenth century, the Qara Qoyunlu (The Black Sheep Turkomans) (1410-1468), and Aq Qoyunlu (The White Sheep Turkomans) (1468-1501) in the fifteenth century. Karabakh, as a part of Arran, has therefore been one of the centres of socio-economic and political processes in Azerbaijan since the Middle Age. Thus, the ruler of The Seljuq Empire, Sultan Alp Arslan (1063-1072), temporarily stayed in Karabakh in the winter of 1064 on his way back from the military movement against the Georgians. Furthermore, Shams-ad-Din Ildeniz (1136-1175) founded the Eldiguzids-Atabegs state in this area – Barda. Three rulers of the Ilkhanate state – Ghazan khan (1295-1304), Arpa khan (1335-1336), and Anushirawan (1344-1355) khan obtained power in Karabakh, while Arghun khan (1284-1291) and Abu Sa’id (1316-1335) passed away in Karabakh. During the rule of Shaikh Awais Jalayir (1359-1374) and Sultan Ahmed (1382- with breaks 1410) Karabakh was ruled by the Jalayirid amirs, and Amir Teymur (1370-1405) used the Karabakh region as a key shelter from his western rivals. In addition, some of the decisive battles in the Qara Qoyunlu and Aq Qoyunlu states took place in Karabakh. Meanwhile, tribes and tribal chiefs from Karabakh played a very relevant role in various significant processes and issues.
When the Safavid Empire was founded in 1501, Karabakh became part of it as Karabakh Beylerbeylik with its centre in Ganja. Referring to the processes of 1508, an anonymous Azerbaijani author recalled in his book “Tarih-i-Alemara-yi Shah Ismail” that Shah Ismail, the first ruler of the Safavid Empire (1501-1524), had praised the Gyzylbash amirs for their gallantry in the struggle and had offered them and their sons various high positions within the Empire. In this regard, the author wrote that Rustem bey Qajar, son of Qara Piri Bey, was appointed as beylerbey (ruler) of Karabakh. According to this information, Rustem bey Qajar, son of Qara Piri Bey, initially ruled the Karabakh Beylerbeylik that was founded during the reign of Shah Ismayil. In addition to this, Ottoman author Haydar Chalabi mentioned in his “Ruzname” the name of Serdar bey Qajar, the ruler of Ganja and Barda, as being one of the Safavid amirs who were killed in the battle of Chaldiran. It was assumed that Serdar bey Qajar was also a successor of the abovementioned Qajar family. As a successor of the Qajar family, the Ziyadoglu family was granted with the title of governor of Karabakh Beylerbeylik by Shah Tahmasib (1524-1576). It is also argued in Azerbaijani historiography that the Karabakh Beylerbeylik was not founded during the period of Shah Ismail. The assumption is that it was formed during the reign of Shah Tahmasib, son of Shah Ismayil, and that Shahverdi Khan from the Ziyadoglu branch of the Qadjar family was its first ruler. Although it is not known who the ruler of Karabakh was during the period of Shah Ismail, Afandiyev claims that the region was ruled by the amirs of the Qajar family. It seems that the leadership in Karabakh at that time passed from the Karamans (another Turkic tribe) to the Ziyadoglu family. It should be mentioned that it was no coincidence that the Qajars held high positions in Karabakh during the Safavid Empire. The Qajars settled in Azerbaijan, as well as in the Ganja and Barda regions of Karabakh, at the time of Oguz Khan’s military campaign in Iran. They were one of the tribes that supported the Safavid movement during the movement of Sheikh Heydar, and they also played an active role in the formation of the Safavid Empire. The Ziyadoglu branch of the Qajar family ruled the Karabakh Beylerbeylik for approximately 250 years (with short breaks) until khanates were established in the territory of Azerbaijan.
The Karabakh Beylerbeylik was one of the 13 administrative regions of the Safavid Empire. Although it is hard to definitely identify the borders of the Karabakh Beylerbeylik, it is possible to say that it covered the historic Arran region, and more precisely, most of the territory between the Kura and Araz rivers. During the sixteenth and seventeenth centuries, the centre of the Karabakh Beylerbeylik was Ganja and its borders extended as far as Tiflis (Tbilisi). It was divided into five mahals (administrative units): Akhstabad (Agstafa), Javanshir, Bergushat, Kazakh, and Shemsheddil. According to historical documents, the number of these mahals changed from time to time. Thus, in 1606, during the period of Shah Abbas I (1587-1629), Lori and Pembek that were drawn back from the Ottoman Empire were also incorporated into the Karabakh Beylerbeylik. According to “Tezkiratul-muluk”, a book dating from the end of the seventeenth century, which described the governmental structure of the Safavid Empire, the mahals that were part of the Karabakh Beylerbeylik were Zeyem, Barda, Akhstabad, Javanshir, Bergushad, Qara-Agac (situated in the Kaxeti region of Georgia), Lori, Pembek, Arazbar, Beyazidi, Simavi, and Terkur. The book shows that the Beylerbeylik had an annual total revenue of 24780 Tuman 9435 Dinar and 6084 members of the regular military forces.
The main reliable sources referring to the demographic situation and ethnic composition of Karabakh during the Safavid Empire are “Ganja-Karabakh Review Book” of 1593, produced by the Ottoman Empire, “The Detailed Book of Ganja-Karabakh” of 1727, and “Tezkiratul-muluk”. According to the historical information contained in these sources, Azerbaijani Turks made up the majority of the population of the Karabakh Beylerbeylik. It should be mentioned that names of the tribes, living places, summer pastures in the mountains and winter quarters were all in Turkish in this region, which confirms the abovementioned conception that these territories belonged to Turkic tribes. Although these sources mention the non-Muslim Christian population that lived in the territory of the Karabakh Beylerbeylik, they do not say anything about the existence of the Christian melikdoms as administrative units within the territory of Karabakh.
 “Azerbaycan”, Türk Ansiklopedisi, Vol. 4, (Istanbul, 1989), pp. 410-420.
 Osmanlı Devleti İle Azerbaycan Türk Hanlıkları Arasındaki Münasebetlere Dair Arşiv Belgeleri, Vol. I (Ankara, Türkiye Cumhuriyyeti Başbakanlık Devlet Arşivleri Genel Müdürlüğü, 1992), p. 19.
 Bünyadov, Ziya, Azərbaycan Atabəyləri dövləti 1136-1225-ci illər (Bakı: Şərq-Qərb, 2007), pp. 38-39.
 Nəcəfli, Tofiq, “XV-XVII yüzilliklərdə Qarabağın ictimai-siyasi həyatı”, in Yılmaz, Reha (ed.), Qarabağ bildiklərimiz və bilmədiklərimiz (Qafqaz Universiteti, 2010), pp. 66-71.
 Anonim, Aləmara-ye Şah Esmail (Tehran: Bünyad-i tərcümə və nəşr-i kitab, 1349), p. 170.
 Sümer, Faruk, Safevi Devleti’nin Kuruluşu ve Gelişmesinde Anadolu Türkleri’nin Rolü (Ankara: Türk Tarih Kurumu Basımevi, 1992), p. 37.
 Эфендиев, Октай, Карабах в составе государств Каракойунлу, Аккойунлу и Сефевидов (XV-XVII вв.), Карабах-Очерк истории и культуры (Баку, 2004), p. 64.
 Nəcəfli, “XV-XVII yüzilliklərdə Qarabağın ictimai-siyasi həyatı”, pp. 72-73.
 Эфендиев, Карабах в составе государств Каракойунлу, Аккойунлу и Сефевидов (XV-XVII вв.), pp. 68-69.
 Эфендиев, Октай, “Территория и границы Азербайджанских государств в XV-XVI вв.”, Историческая география Азербайджана (Баку, 1987), p. 114.
 Musalı, Namiq, “Səfəvilər zamanında Qarabağ bəylərbəyliyinin yaradılması və onun inzibati quruluşu”, Qarabağ dünən, bu gün və sabah V elmi-əməli konferansın materealları (Bakı, 2006), pp. 167-168.
 Nəcəfli, “XV-XVII yüzilliklərdə Qarabağın ictimai-siyasi həyatı”, pp. 81-84.