At the time of the Safavid state, the entire territory of Azerbaijan was made up of four beylerbeydoms: Shirvan, Karabakh (or Ganja), Chukhursaad (or iravan) and Azerbaijan (or Tabriz) [ref]Rahmani A. A. Azerbaijan in the late 16th and 17th centuries (1590–1700). Baku, 1981, pp. 87–89[/ref]. These regions were headed by the shah’s governors-general who were called beylerbeys.
The first beylerbey of Karabakh was Shahverdi-Sultan from the Ziyad-oglu clan of the Azerbaijani Gajar tribe, who was appointed by Shah Tahmasib I in the 1540s. The nobility of the tribe was granted pastures and land plots in Karabakh [ref]A collection of articles on the history of Azerbaijan, edi- tion 1, Baku, 1949, p. 250[/ref]. The power of the Karabakh beylerbey covered a vast territory – from the Georgian border near “Sinig Korpu” Bridge (currently “red Bridge”) to Khudafarin Bridge on the Araz river [ref]Mirza Adigozal-bey, Karabakh- nameh, Baku, 1950, p. 47[/ref].
The descendants of Shahverdi-Sultan were Karabakh beylerbeys with a khan’s title until 1736 when Nadir- shah took Karabakh proper from Ziyad-oglu, leaving him with ganja and a county, which he and his heirs owned until 1804 [ref]A collection of articles…, p. 250[/ref]. in 1747, Nadir-shah was killed as a result of a conspiracy. His empire split up into independent feudal possessions. “Before Persian troops withdrew from this region, indepen- dent rulers emerged in every province” [ref]A. K. Bakikhanov, Gulistan-i Iram, Baku, 1991, p. 154[/ref].
Thus, sovereign feudal state entities – 20 khanates – emerged in Azerbaijan.
The Karabakh khanate, which was one of the most significant ones, emerged on the lands between the Kura and the Araz. Most of its population was made up of the Azerbaijani tribes of otuziki, Javanshir and Kabirli, who were “indigenous ilats of the Karabakh vilayet” and inhabited lowland areas. These tribes were forcibly resettled to Khorasan under Nadir-shah [ref]Mirza Adigozal-bey, ibid., p. 47[/ref]. after his death, they returned to Karabakh, “and everyone who arrived in their former camp started to live quietly” [ref]Mirza Jamal Javanshir, The History of Karabakh, Baku, 1959, p. 67[/ref].
The founder of the Karabakh khanate was Panah Ali-bey Javanshir (1747–1763) from the Sarijali oymag of the Javanshir tribe, who “was one of the most significant statesmen of Azerbaijan in the 18th century” [ref]I. P. Petrushevskiy, The Khanates of Azerbaijan and the Emergence of Russian Orientation. News of the Academy of Sciences of the Azerbaijan SSR (department of general science), edition 2, 1946, No 5, p. 100[/ref]. The future Karabakh khan was the leader of the otuziki tribe and emir of 20,000 courts of Javanshir and Gazakh [ref]G. Abdullayev, Azerbaijan in the 18th century and its mutual relations with Russia, Baku, 1965, p. 91[/ref]. He served Nadir for some time, but “fearing for his life”, he fled Khorasan to Kara- bakh together with a group of his supporters and close circle in 1738. There, he took charge of armed detachments that fought Iranian oppression [ref]Mirza Jamal Javanshir, ibid., pp. 66–67[/ref].