The Ottoman Empire organized four military incursions into Azerbaijan during the reign of Sultan Suleyman Kanuni (1520-1566), who also known as Suleyman the Magnificent in the West. Although Tabriz was occupied three times during these incursions, the Ottomans were not able to incorporate the territories of Azerbaijan as well as of Karabakh into the Ottoman Empire. However, Ottoman society was well informed about Karabakh, thanks to the efforts of scholars and thinkers from Karabakh. In the late fifteenth century and the first half of the sixteenth century, many scholars and thinkers from Karabakh worked in Istanbul and in various parts of Anatolia, such as Ibrahim Gulshani (1423-1534), Sananaddin Yusif (unknown-1516), Mahyaddin Muhammad Bardai (unknown-1522), Mahyaddin Muhammad Ali Karabakhi (unknown-1535), Muhammad Hafiz (unknown-1550), and Shamsaddin Ahmad Karabakhi (unknown-1600).
Karabakh was part of the Ottoman Empire for the first time during the reign of Sultan Murad III (1574-1595), after the Istanbul Peace Treaty of 1590 between the Ottoman and the Safavid empires. After the Safavid-Ottoman war, from 1578 to 1590, the Ottoman Empire created four provinces (beylerbeylik) in the occupied regions of Azerbaijan: Shirvan, Chukhursad, Tabriz and Ganja-Karabakh. Ganja-Karabakh province mainly covered the territories of Karabakh Beylerbeylik between the Kura and Aras rivers as far as Tiflis (Tbilisi), which was founded by Shah Ismayil I. In accordance with the ‘land management’ law in Ganja-Karabakh province, a census of people and households was conducted by the Ottoman Empire, in order to determine taxes and other responsibilities. According to the “Ganja-Karabakh Review Book” of 1593, produced by the Ottoman Empire, Ganja-Karabakh province was divided into seven sanjak (districts) and 36 nahiya, (subdistricts) as follows: Barda district [sanjak] that consisted of Barda, Sir, Peteklik, and Incarud sub-districts [nahiye]; Khachyn district that consisted of Khachyn, Qara-Agac, Agcabadi, Mountains (upper) Chilabord, Chilabord, Qarqar, and Maghaviz subdistricts, where the Otuzikili and Hajili tribes were living; Akhstabad district that consisted of Boyukchay, Quzey, Guney, Mountains (upper) Ince, and Ince subdistricts; Dizag district that consisted of Arasbar, Mountains (upper) Dizag, and Dizag subdistricts; Hakari district that consisted of Keshtasf, Hakari, Zaris, and Alpaut subdistrict; Varanda district that consisted of only the Varanda subdistric. In addition, the “Ganja-Karabakh Review Book” also states that the majority of the population of Karabakh were Azerbaijani Turks at the end of the sixteenth century.
At the beginning of the seventeenth century, tension between the Safavid and Ottoman empires over the territories of Azerbaijan increased, and as a result of the war between the two empires, Karabakh was freed and reincorporated into the Safavid Empire in 1606. According to the Istanbul Peace Treaty that was signed between these empires in 1612, the terms and conditions of the Treaty of Amasya of 1555 were restored, according to which Karabakh came within the borders of the Safavid Empire. Until the second decade of the eighteenth century, social, economic, and cultural relations between Azerbaijan and the Ottoman Empire were growing, and well-known scholars and thinkers from Karabakh, such as the Karabakhi Ahmadzades family, Karabakhi Ishag Afandi (unknown-1646) and his son Beyrut, as well as Muhammad Saleh b. Ishag Zuhiri (unknown-1673), played an essential role in these relations during that time. The well-known Ottoman traveller Evliya Celebi, who travelled to Azerbaijan in the mid-seventeenth century, also gave valuable information in his famous book Seyahetname (Book of Travels) about Karabakh and the Karabakh thinkers’ role in relations between Azerbaijan and the Ottoman Empire.
In the first quarter of the eighteenth century, the Russian Tsarist and Ottoman empires engaged in power politics with a view to dividing up the heritage of the Safavid Empire and the territories of Azerbaijan. At the beginning of the eighteenth century, the Ottoman Empire was therefore seriously involved in ongoing processes in Azerbaijan aimed at increasing the Empire’s control over it. Sultan Ahmed III (1703-1730) defended a rebellion in the Shirvan region of Azerbaijan against the Safavid Empire and heeded requests by the rulers of Shirvan and Dagestan. As a logical continuation of this, Haji Davud, the ruler of Shirvan, was accepted into the tutelage (patronage) of the Ottoman Empire.
In 1723, the Ottoman Empire organized a military movement against Georgia and Azerbaijan. Although this military movement was not successful, and the Ottoman Empire was not able to capture the Ganja region of Azerbaijan, it may have led to a new war with Tsarist Russia in the South Caucasus. This became a ‘Gordian Knot’ for the Tsarist, Ottoman, and Safavid empires, since they all had geopolitical interests. Due to a recent war with Sweden on its western border, Russia was unable to engage in a new war, and it therefore attempted to resolve the situation with the Ottoman Empire through diplomacy. The Treaty was signed by the parties on July 12, 1724 in Istanbul. This gave control of Azerbaijan territories on the Caspian Sea coast to Tsarist Russia, which in return recognized the remaining territories of Azerbaijan as part of the Ottoman Empire. As a result, a year after the signing of the Treaty, Tiflis, Tabriz, Erivan, Ganja, and Karabakh were all annexed to the Ottoman Empire.
Karabakh remained part of the Ottoman Empire until 1735 and was incorporated into a new Ganja-Karabakh (province) administrative unit that was created by the Ottoman Empire. The most reliable and informative source of precise information in this regard was “The Detailed Book of Ganja-Karabakh”, written by financial officers of the Ottoman Empire in 1727. Under the new administrative divisions of the Ottoman Empire, Ganja-Karabakh province consisted of five sanjaks (districts), two kazas (legal subdivisions of sanjaks), namely Ganja and Lori, and 37 nayihe (subdistricts). The province also included the cities of Ganja, Barda, and Khilkhila, as well as Lori Fortress.
Along the administrative division of Karabakh, it is possible to get precise information also about the social, economic, and cultural life, as well as ethnic composition of the region in “The Detailed Book of Ganja-Karabakh” of 1727. According to this book, only 27 out of the 1178 villages were registered with an Armenian name at that time, and approximately 40 per cent of the Turkic-Muslim population of the Karabakh region was forced to leave their homes as a result of the war between the Safavid and Ottoman empires. While taking into consideration the numbers of churchmen that were freed from the taxes and did not take part in the list of the population while the census was conducted in the region and the military men and soldiers that died in the battles, the portion of the non-Muslim population of the Karabakh region at the beginning of the eighteenth century, including Armenians, have not pass 20% of the whole population.
When Nadir Shah came to power, he succeeded in incorporating the territories of Azerbaijan, which had been invaded by the Tsarist Russian and Ottoman empires in the first half the eighteenth century, into the Safavid Empire. Thus, according to the treaties that were signed between the Safavid and Russian empires in 1735 and between the Safavid and Ottoman empires in 1736, the territorial integrity of the Safavid Empire was restored and Karabakh became part of the Safavid Empire under the rule of Nadir Shah.
 Azərbaycan tarixi, Vol. 3, (1999), pp. 201-205. See also: Kırzıoğlu, Fahrettin, Osmanlı’ların Kafkas-Ellerini Fethi (Ankara: Türk Tarih Kurumu, 1998), pp. 243-249.
 Süreyya, Mehmed, Sicill-i Osmani, Vol. 1-5, (İstanbul, 1996), pp. 558-755-1107-1514-1578. See also: Dədəyev, Bilal, “Rus işğalına qədər Qarabağ-Osmanlı dövləti münasibətlərinə dair”, Journal of Qafqaz University, filologiya və pedoqogika, No. 30, 2010, pp. 100-101.
 Azərbaycan tarixi, Vol. 3, (1999), p. 240. See also: Yazıcı, Tahsin, “Safeviler”, İslam Ansiklopedisi, Vol. 10, (1988), p. 56.
 Məmmədov, Hüsaməddin, Gəncə-Qarabağ əyalətinin müfassəl dəftəri (Şuşa nəşriyyatı, 2000), pp. 5-6.
 Süreyya, Sicill-i Osmani, pp. 804-1011-1260-1645-1718. See also: Kahraman, Asiye, İshak- zade Zuhuri Divanı inceleme-metin (Selçuk Üniversitesi, Sosyal Bilimler Enstitüsü nəşr olunmamış magestratura işi, Konya, 2002).
 Çelebi, Evliya, Seyahatname (Book of Travels), Vol. 2 (İstanbul, 1314), pp. 235-242.
 Azərbaycan tarixi, Vol. 3, (1999), pp. 362-365.
 Məmmədov, Gəncə-Qarabağ əyalətinin müfassəl dəftəri, pp. 3-22.