Oleksandr Palii, A History of Ukraine, 26.01.2018
After the Mongol invasion, hordes led by Mongols and composed also of the remaining Cumans and natives of Central Asia roamed southern Ukraine. The unpopulated Wild Fields laid between these lands and the areas settled by Ukrainians. In 1347-1348, a plague epidemic originated in the Crimea, spread via Byzantium, sweeping across all of Europe within several years and reaching back Ruthenia (Ukraine) via Poland.
The Crimean Khanate (Qırım Hanlığı aka Qırım Yurta) originated in the early 15th century when certain clans of the Golden Horde Empire ceased their nomadic life in the Desht-i Kipchak — Kypchak Steppes of today's Ukraine and southern Muscovy (Russia) — and decided to make Crimea their yurt (homeland). At that time, the Golden Horde of the Mongol empire had governed the Crimean peninsula as an ulus since 1239, with its capital at Qirim (Staryi Krym). The local separatists invited a Genghisid contender for the Golden Horde throne, Hacı Giray (born in 1397 in Lida, Lithuania), to become their khan. Hacı Giray accepted their invitation and traveled from exile in Lithuania.
He warred for independence against the Golden Horde from 1420 to 1441, in the end achieving success. But Hacı Giray then had to fight off internal rivals before he could ascend the throne of the khanate in 1449, after which he moved its capital to Qırq Yer (today it's a part of Bağçasaray). The khanate included the Crimean Peninsula (except the south and southwest coast and ports, controlled by the Republic of Genoa) as well as the adjacent steppe.
Meanwhile, in 1453, the biggest and the richest city of Eastern Europe during 1000 years, Constantinople, falled to a huge muslim army commanded by 22-year-old Ottoman Sultan Mehmed II, and was renamed to Istanbul.
The sons of Hacı I Giray contended against each other to succeed him. The Ottomans intervened and installed one of the sons, Meñli I Giray, on the throne. Meñli I Giray, took the imperial title "Sovereign of Two Continents and Khan of Khans of Two Seas."
In 1475 the Ottoman forces, under the command of Gedik Ahmet Pasha, conquered the Greek Principality of Theodoro and the Genoese colonies at Cembalo, Soldaia, and Caffa (modern Feodosiya). Thenceforth, since 1478, the Khanate was a protectorate of the Ottoman Empire. The Ottoman sultan enjoyed veto power over the selection of new Crimean khans. The Ottoman Empire annexed the Crimean coast but recognized the legitimacy of the Khanate rule of the steppes, as the khans were descendants of Genghis Khan.
Although khan Hacı I Giray came to power in the Crimea with the help of Lithuanian princes, the Crimean Khanate pushed the Grand Duchy of Lithuania and Ruthenia back from the Black Sea coast since 1480, ravaging, looting and burning its cities and lands and enslaving its inhabitans in almost yearly military campaigns. These yearly invasions lasted until 1783 when the Crimean Khanate was annexed by Muscovy (Russian Empire).
Crimean Tatar vanguard of the Turkish army (bottom), Turkish miniature depicting a military expedition to Europe in 1566.
The Crimean Khanate became the closest ally of Muscovy in their permanent attacks of Ruthenia and Lithuania, and even the Great Horde. In 1502, Meñli I Giray defeated the last khan of the Great Horde, which put an end to the Horde's claims on the Crimea.
But as soon as in 1506 the Crimean–Muscovy alliance was broken due to a Muscovy's war against the Kazan khanate. The first raid on Muscovy was in 1507, and since then The Crimean Khanate had been attacking Muscovy and enslaving its inhabitans too every year until its end in 1783.
In Muscovy, the defensive line against the Crimean Tatars was just 200 km away from Moscow, between the cities of Nizhniy Novgorod, Serpukhov and Tula. Muscovy continued to regularly pay tribute to the Crimean Khanate as the successor of the Great Horde. This tribute was called upomynky and was paid until the early 18th century.
Bağçasaray (Bakhchisaray), painting by Carlo Bossoli, 19th century.
The Crimean Khanate initially chose Salaçıq (near the Qırq Yer fortress) as its capital. Later, the capital was moved a short distance to Bağçasaray, founded in 1532 by Sahib I Giray. Both Salaçıq and the Qırq Yer fortress today are part of the expanded city of Bağçasaray. Meanwhile, during all those years, the Crimean Khanate, being itself a muslim state, was home to many Christians (Greeks, Armenians, Genoese etc.) who were a leading force in the Khanate's economy.