The war of 1768-1774 came to an end with a disaster for the Crimea. In the beginning of the year of 1769, the Crimean Khan, Giray Khan organised a successful raid from Bessarabia towards the Russian lands. Pursuant to this raid, the Russian armies invaded Bucak in the year of 1770 and then the Crimean peninsula under the command of the Prince Dolgorukiy in the year of 1771. The Crimean Khan Giray III could escape and come to Istanbul under great difficulties. The memories of Necati Effendi who was the registrar of the Ottoman chief commander include interesting information and details about the conflicts and the disorganisation between the Crimean people and the Ottomans in the course of this war. Under these hopeless circumstances, the princes that wanted to transform the khanate into an independent khanate from the Ottomans gained an influential position. In the grand assembly that gathered under the Russian invasion in the year of 1772, they did not recognise Mahmud Giray as their khan that was appointed by the Ottomans and they elected Sahib Giray as the independent khan of the Crimea. A committee composed of princes set in motion towards Moscow.
According to the 3rd article of Küçük Kaynarca Convention (21st July 1774); "the Tatar nations of the Crimea, Bucak, Kuvan, Yedisan, Camboyluk and Yediçkul (Yedicek) would be considered as free and fully independent nations; they would be under the domination of their khans that would be selected from the Jenghiz lineage according to their own will and consents and the khan would govern these nations according to their old rules and traditions regardless of any foreign state. Therefore, neither Russia nor the Sublime Ottoman Government would interfere in the election and enthronement of the relevant khan under any circumstances They would treat these states in the same manner as all the other states that are self-sufficient through self-determination and that are not submissive to any other person but God. However, since Tatars are Muslims and the sultan is the caliph of Islam, these nations would treat themselves as stated and ordered by the canonical laws. Nevertheless, this treatment would not jeopardise the political and civil rights and freedoms of these nations that are confirmed above."
This article that recognised the ruler as the caliph of the Crimean people indicated a contradiction and therefore, it was the source of the further difficulties. The Crimean peninsula and the regions extending from the Bug River towards the Kuban River where Turks dwelled were declared as independent under the domination of the independent Crimean khan. However, according to the other articles of the convention, Russia had annexed the important military points, Yeni-Kale (New-Castle) and Kerç from both sides of the Sea of Azob, the castle of Kilburun in the spring of Dneper River and its environs, and the great and small Kabartay regions to its empire. Under these circumstances, it was possible for the khanate to maintain an independent existence and this was only a political intrigue in order to facilitate the annexation of all the regions in the further periods. The princes and Sahin Giray that were the supporters of independency went to Moscow and they were used as an instrument against the Ottoman State. On the other hand, the Ottomans maintained the castle of Özü (Ocakof) in their domination and they hoped that they would maintain the submission of the khanate through the post of caliphate. Both sides laid the agreement open to the opportunities in order to protect the state which they confirmed to be independent. This situation led a terrible civil war in the Crimea and it ended up with the calamity in the country.