The mentions of the term "Karabakh” go back to a period between the 16th and mid-18th centuries. "Karabakh” commonly designated Artsakh's extension in the eastern lowlands of Armenia, which experienced the incursion of nomadic Turkic tribes from the Central Asia in the late Middle Ages.
The term Karabakh is of Armenian origin, meaning "Great Baghk” and pointing to the Kingdom of Baghk that in the period between the 10th and the 13th centuries occupied the southern portion of Armenia ’s provinces of Artsakh and Syunik.  However, the Turkic nomadic migrants came to use this term for referring to the land of Artsakh because of its phonetic similarity to what appears to be a combination of the Turkic word "Ghara” (meaning "black”) and the Persian word "Bagh” (meaning "garden”). Such phonetic misconstructions appear when a group that arrives to a new land from elsewhere tries to adapt local toponyms to their own language.
As the Turko-Islamic colonization expanded, in Artsakh—as in many places throughout the Near East, Asia Minor and the Balkans—the nomads gradually pushed the indigenous Christians to the mountains, as they assumed control of the plains. As a result, the central and eastern regions of what is now the Azerbaijani Republic lost most of its aboriginal Armenian population who migrated west and found refuge in the impregnable Christian strongholds populated and ruled since the Roman times by Artsakh’s Armenian mountaineers. 
However, the economic life of the Turkic nomads, which required access not only to lowland areas but also to hilltop pastures, and their values, which derived from misinterpreted principles of Islam, denied Christians most political and social rights while legitimizing banditry and looting. This eventually pitted the nomadic newcomers and Islamized Armenians against the Christian highlanders too, and established the basis of the historical confrontation between the Armenian natives of Artsakh and the Turkic tribesmen of the Southeastern Caucasus, some of whom chose to be called "Azerbaijanis” in the 1920s.
In the 18th century, however, a long Armenian-Turkish war with Ottoman invaders ravaged Artsakh while internal disagreements further weakened its administration. As a result, in the early 1760s, the Armenian dukes (meliks) of Artsakh succumbed to the pressure of the Muslim tribes, which nearly succeeded in penetrating the region and establishing a parallel Turkic-Armenian rule over the province. The consequence was the proclamation of so-called "Karabakh Khanate,” a short-lived Armeno-Turkic principality in Artsakh that in 1805 was absorbed into the Russian Empire, after 40 years of existence, and abolished. The effect of the Khanate’s collapse was a century of relative stability in regional Muslim-Christian relations. In this period, the regional capital of Shushi developed into an important trade center and produced dozens of outstanding musicians, historians, writers and engineers.
Despite the relatively quick demise of the Karabakh Khanate, some Turkic settlers chose not to return to the eastern steppe, from where they had arrived. Instead, they stayed in Artsakh, limiting their presence to the Muslim quarter of the city of Shushi but turning that settlement into a hub of latent inter-communal tensions.
The Armenian-Turkic conflict in Artsakh was ignited once again with the ascent of the era of nationalism, when in the beginning of the 20th century the Caucasus was plunged into inter-ethnic strife accompanied by pogroms and incidents of mass murder. The largest of such clashes took place in 1905-1906, and is known as the "Armenian-Tartar War” (as mentioned above, the term "Azerbaijanis” was invented in the 1920s; instead, they were referred to as "Tartars” by Russians and "Turks” by Persians, Armenians and Georgians). 
 On the term Karabakh and its relation to the Kingdom of Ktish-Baghk, see: Hewsen, Robert H. Armenia: a Historical Atlas. Chicago, IL: University of Chicago Press, 2001. p. 120. See also: Armenia & Karabagh (tourist guide). 2nd edition, Stone Garden Productions, Northridge, California, 2004, p. 243
 Bournoutian George A. A History of Qarabagh: An Annotated Translation of Mirza Jamal Javanshir Qarabaghi's Tarikh-E Qarabagh. Costa Mesa, CA: Mazda Publishers, 1994, Introduction
 For discussion of Azerbaijan’s self-definition see: Stuart J. Kaufman. Modern Hatreds: The Symbolic Politics of Ethnic War. Cornell University Press, 2001; pages 50-65