The Karabakh Khanate was ruled by a Khan who possessed unlimited power and had extensive responsibilities in secular as well as religious affairs. During its 75 years of history, the Karabakh Khanate was ruled by three khans, Panah Ali Khan (1747-1763), Ibrahimkhalil Khan (1763-1806), and Mehdigulu Khan (1806-1822). After the death of Panah Ali Khan, for a short time there was diarchy due to a power struggle between Ibrahimkhalil Agha and his brother, Mehrali Bey. This struggle ended in 1763 with the expulsion of Mehrali bey from Karabakh. As a result, Ibrahimkhalil Agha became the sole khan of the Karabakh Khanate in 1763.
The most significant assistance provided by the Khan in governing the Khanate was the Khanate’s Divan – an advisory body that functioned under the authority of the Khan. In addition to governance, the Divan’s council also dealt with tax matters. There were review books in the Divan that the detailed number of the whole population and the names of youth that were eligible for the military service were listed. The court also played an essential role in the Khanate’s administrative system, since it was responsible for trials and functioned separately from the Divan. The court was governed by Sharia law. The meetings and discussions in the Khanate’s Divan and court were being held with the participation and supervision of the Khan and Gazi.
The second most important position after the khan was the Vezir (vizier), who was responsible for the Karabakh Khanate’s internal and foreign affairs. The best-known viziers of the Karabakh Khanates were Molla Panah Vagif and Mirza Jamal Javanshir. Not only were these viziers statesmen, they were also famous poets and intellectuals of their time. In addition to viziers, there were sarkalali, eshikagasi, and khazinedar in the Khanate, who dealt with financial issues, the personal affairs of the khan, and treasury matters, respectively. There was also a post that involved taking care of warehouses. In the eighteenth century, the territory of the Karabakh khanate, which included today’s Karabakh, was bordering with the Khudaferin Bridge over Aras River and Cavad, Zardab, and Alvand villages in the south, Kura River in the east, Goran River that lay between Ganja and Karabakh khanates in the north, and the Karabakh mountains and Nakhchivan Khanate in the west. The Karabakh Khanate had an area of approximately 18000 km2, and was 182 km. from north to south and 273 km. from east to west.
The Karabakh Khanate consisted of 21 mahals (administrative units), including Chalbayir, Zangazur, Mehri, Sisyan, Damirchi-Aslanli, Gupara, Bargushat, Bahabyurd, Talish (Gulustan), Javanshir, Khachin, Chilabord, Khirdapara, Dizag, Otuzikili, Iyirmidort, Garachorlu, Varand, and Acan-turk. The population of five of these mahals, or melikdoms, which were called “Khamsa” by the people of Karabakh, was predominantly Christian. Their rulers were called Maliks. The rulers of mahals where the population was predominantly Muslim, on the other hand, were called mahal beys or naibs. Each mahal was, in turn, divided into villages. In “The Detailed Book of Ganja-Karabakh”, produced by the Ottoman Empire in 1727, the names of 796 villages were registered in total in the territories that later became part of the Katabakh Khanate. This number was subsequently recorded as 629 villages and oymags in a census that was conducted by Russia a century later, in 1823. The ruler of a village in the Karabakh Khanate was called a kendkhuda, or kokha, as in other khanates in Azerbaijan.
The initial centers of the Karabakh Khanate were first Bayat fortress (1748) and later Shahbulag fortress (1749), which was built in a place called Tarnakut. However, from 1751 the center of the Khanate was Shusha (Panahabad) fortress. Due to its strategic importance, the city of Shusha was one of the most important trade centers in Azerbaijan in the last quarter of the eighteenth century. The Silk Road, which passed through Azerbaijan, also played a major role in the development of Shusha as a trade center. This economic growth also resulted in an increase in the number of people living in the city. In the late eighteenth and early nineteenth centuries, Shusha consisted of 17 mahallas (quarter/district). The person responsible for the fortresses of the Karabakh Khanate, including Shusha, was called Galabeyi.
 Cavanşir, Əhməd bəy, “Qarabağ xanlığının 1747-1805-ci illərdə siyasi fəaliyyətlərinə dair”, in Akif Fərzəliyev (ed.), Qarabağnamələr (Bakı: Yazıçı, 1989), p. 163. See also: Axundov, Nazim, Qarabağ salnamələri (Bakı: Yazıçı, 1989), p. 78.
 Adıgözəl bəy, Mirzə, “Qarabağnamə”, in Akif Fərzəliyev (ed.), Qarabağnamələr (Bakı: Yazıçı, 1989), p. 50.
 Azərbaycan tarixi, Vol. 3, (1999), p. 451.
 Mustafazadə, Tofiq, Qarabağ xanlığı (Bakı: Sabah, 2010), pp. 123-124.
 Qarabaği, Mirzə Camal Cavanşir, “Qarabağ tarixi”, in Akif Fərzəliyev (ed.), Qarabağnamələr (Bakı: Yazıçı, 1989), pp. 107-109. See also: Qaradaği, Həsənəli, “Qarabağ vilayətinin qədim və cədid keyfiyyəti və övzaları”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), p. 352.
 Sami, Şemsettin, Kamusu’l – A’lam, Vol. 5, (Kaşgar neşriyat, 1996), p. 3621.
 Mirzə Camaloğlu, Rzaqulu bəy, “Pənah xan və İbrahim xanın Qarabağda hakimiyyətləri və o zamanın hadisələri”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), p. 206.
 Mustafazadə, Qarabağ xanlığı, p. 96.
 Qeybullayev, Qiyasəddin, Qarabağ-etnik və siyasi tarixinə dair (Bakı: Elm, 1990), 151. See also: Mustafazadə, Qarabağ xanlığı, pp. 97-98.
 Qarabaği, Mirzə Yusif, “Tarixi-Safi”, in Nazim Axundov (ed.), Qarabağnamələr (Bakı: Yazıçı, 1991), p. 15.
 Adıgözəl bəy, “Qarabağnamə”, p. 35.
 Qarabaği, “Tarixi-Safi”, p. 19.
 Vaqif, Molla Pənah, Əsərləri (Bakı, 1960), p. 231.