He became the founder of the Giray dynasty, which ruled until the annexation of the Crimean Khanate by Russia in 1783. Hacı I Giray was a Jochid descendant of Genghis Khan and of his grandson Batu Khan of the Golden Horde. During the reign of Meñli I Giray, Hacı's son, the army of the Great Horde that still existed then invaded the Crimea from the north, Crimean Khan won the general battle, overtaking the army of the Horde Khan in Takht-Lia, where he was killed, the Horde ceased to exist, and the Crimean Khan became the Great Khan and the successor of this state. Since then, the Crimean Khanate was among the strongest powers in Eastern Europe until the beginning of the 18th century. The Khanate officially operated as a vassal state of the Ottoman Empire, with great autonomy after 1580, because of being a Muslim state, the Crimean Khanate just could not be separate from the Ottoman caliphate, and therefore the Crimean khans had to recognize the Ottoman caliph as the supreme ruler, in fact, the viceroy of Allah on earth. At the same time, the Nogai hordes, not having their own khan, were vassals of the Crimean one, Muskovy and Polish-Lithuanian commonwealth paid annual tribute to the khan (until 1700 and 1699 respectively). In 1711, when Peter I of Russia went on a campaign with all his troops (80,000) to gain access to the Black Sea, he was surrounded by the army of the Crimean Khan Devlet II Giray, finding himself in a hopeless situation. And only the betrayal of the Ottoman vizier Baltacı Mehmet Pasha allowed Peter to get out of the encirclement of the Crimean Tatars. When Devlet II Giray protested against the vizier’s decision, his response was: ""You might know your Tatar affairs. The affairs of the Sublime Porte are entrusted to me. You do not have the right to interfere in them"". Treaty of the Pruth was signed, and 10 years later, Russia declared itself an empire. In 1736, the Crimean Khan Qaplan I Giray was summoned by the Turkish Sultan Ahmed III to Persia. Understanding that Russia could take advantage of the lack of troops in Crimea, Qaplan Giray wrote to the Sultan to think twice, but the Sultan was persistent. As it was expected by Qaplan Giray, in 1736 the Russian army invaded the Crimea, led by Münnich, devastated the peninsula, killed civilians and destroyed all major cities, occupied the capital, Bakhchisaray, and burnt the Khan's palace with all the archives and documents, and then left the Crimea because of the epidemic that had begun in it.