The administrative and literary language in Karabakh until the end of the 19th century was Persian, with Arabic being used only for religious studies, despite the fact that most of the Muslims in the region spoke a Turkic dialect.
Panah Ali Khan's tenure was marked by building activities (such as the castles of Bayat, Shah-Bulaghi, and Panahabad) and the subjugation of four of the melikdoms through the assistance of his new ally, Shahnazar II, the melik (prince) of Varanda.
In May 1805, he submitted to the Russians, signing the Treaty of Kurekchay, which granted them full authority over Karabakh's external affairs in exchange for a yearly payment.
In 1822, Mehdi Qoli Khan fled to Iran as a result of the attempts by the Russian general Aleksey Petrovich Yermolov to abolish the khanates, which occurred afterwards.
By the early 16th century, Armenia had become a focal point of the constant wars between the Ottoman Empire (c. 1299–1922) and Safavid Iran (1501–1736),[4] which further reduced the Armenian population.
The Safavid-era historian Iskandar Beg Munshi (died c. 1632) reported that the Javanshir did not belong to the seven principal Qizilbash tribes, but instead a lower-ranking group referred to as the "gholam amirs".
Karabakh and Zangezur were the only parts of Iranian Armenia which managed to fend off the Ottomans, under the leadership of Davit Bek, who led the Armenian meliks.
[6][13] Although Davit Bek died between 1726 and 1728, his successors managed to maintain their control over most of the highlands until the resurgence of Iran, now led by Nader Khan Afshar, who repelled the Ottomans in 1735.
[20] Shortly afterwards, Panah Ali Khan had the Bayat Castle constructed, in which he housed his entire family, his retinue, dignitaries, and numerous tribal leaders.
[22] In 1752, Panah Ali Khan relocated everyone from Bayat to the newly constructed Shah-Bulaghi stronghold, which brought him within close proximity of the highlands ruled by the five Armenian melikdoms.
[24] The nature of the Javanshir khans' patron-client relationship with Shahnazar II is unclear, but it appears that their control of the fortress was restricted to its southern part, which was its Muslim sector.
Panah Ali Khan afterwards captured the city of Ardabil and installed his clansman Dargah-Qoli Beg Javanshir its governor, though it is uncertain how long he held the post.
As they battled to preserve their autonomy at a time when the Iranians and Russians wanted to incorporate the eastern Caucasus under their own empires, Georgia and Karabakh's partnership turned out to be highly beneficial for both of them.
[24] Ibrahim Khalil Khan continued his fathers efforts to dominate all of Karabakh, succeeding in retaining Shahnazar II's support and also married his daughter.
[36] The Russo-Turkish War of 1787–1792 caused the Russian troops to abandon the city of Tiflis at the same time as Agha Mohammad Khan's authority in Iran was growing.
In May 1805, Ibrahim Khalil Khan signed the Treaty of Kurekchay, which granted Russia full authority over Karabakh's external affairs in exchange for a yearly payment.
[32] In the same year, Fath-Ali Shah led a large force to the Aras River, while the crown prince Abbas Mirza was assigned with the task of handling Ibrahim Khalil Khan.
During this period, Ibrahim Khalil Khan sent a letter to Fath-Ali Shah, in which he apologized for yielding to the Russians, declared his willingness to side with Iran, and requested assistance in regaining control of the castle at Shusha.
[53] In June 1812, Mehdi Qoli Khan received a farman (royal decree) from Fath-Ali Shah, asking him to reaffirm his loyalty and work with him to expel the Russians from Karabakh.
[54] The Russo-Iranian War of 1804–1813 ended with the Treaty of Gulistan, in which Iran agreed to cede the majority of their holdings in the eastern Caucasus to Russia, including Karabakh.
[56] In 1822, Mehdi Qoli Khan fled to Iran as a result of the attempts by the Russian general Aleksey Petrovich Yermolov to abolish the khanates, which occurred afterwards.
The Iranian American historian George Bournoutian stated this passage shows that Javanshirs tribal dominion included more than just pastoral or migratory land.
According to the numismatists Alexander Akopyan and Pavel Petrov, this was not unusual, as Ibrahim Khalil displayed pro-Russian sentiment and engaged in negotiations with Russian officials, but was also under Iranian influence and tried to have his coins easily spread in Iran.
"[69] "Panahabad" was a laqab (honorific) used to refer to Shusha, albeit it was only employed in official, bureaucratic language and not as a toponym, as the word is missing from Turkic texts that date back to the fortress' construction.
Even tax-exempt tribes contributed financially and in kind when mercenaries were needed, but the khan covered the expenses of their equipment and horse fodder when they joined the army.
[81] The Iranologist Willem Floor uses the example of Panah Ali Khan as an argument that the character and design of Iran's political system were unaffected by increased tribal activity.
A portion from Qom's earnings was provided to Ibrahim Khalil Khan's daughter Agha Baji and her 200 personal attendants from Karabakh after she joined the harem of Fath-Ali Shah.
[82] The administrative and literary language in Karabakh until the end of the 19th century was Persian, with Arabic being used only for religious studies, despite the fact that most of the Muslims in the region spoke a Turkic dialect.
The people who lived in the present-day country of Azerbaijan identified as either Muslims of the ummah (community), or Turks, who shared a language family spread out throughout a considerable portion of Central Asia, or as Persians.
[88] The 2003 Azerbaijani edition of the Russian survey of 1823 is an altered version of the original work; in addition to having several typographical errors, it also frequently omits key information, such as the word "Armenian," either mistakenly or on purpose.