the same time, the Armenian meliks were granted command over neighboring Armenian principalities and Muslim khans in the Caucasus, in return for the meliks' victories over the invading Ottoman Turks in the 1720s. According to some historiographers of the 18th century, of those five meliks, only melik-Hasan-Jalalyans, the rulers of Khachen, were residents of Karabakh. The melik-Beglaryans of Gulistan were native Utis from the village of Nij in Shirvan; melik-Israelyans of Jraberd were descendants of the melik of Siunik to the south-east and hailed from the village of Magavuz in Zangezur; melik Shahnazars of Varanda hailed from the region of Armenian Gegharkunik to the east and received the title of meliks from Shah Abbas I in reward for their services; Melik-Avanyans of Dizak were descendants of the meliks of Lori, an Armenian princedom to the north-west. Modern western scholar Robert Hewsen and Cyril Toumanoff have demonstrated that all of these meliks were descendants of the House of Khachen. The idea of Armenian independence in Karabakh from Persia first arose at the end of the 17th century thanks to the meliks. Parallel with the armed struggle, Armenians of that period made diplomatic efforts, at first turning to Europe, then to Russia. Such political and war leaders as Israel Ori, archimandrite Minas, the Catholicos of Gandsasar Yesai Jalalian, the iuzbashis (commanders of hundred; the capitans) Avan Yuzbashi and Tarkhan became leaders of the people. The political instability in Persia in the 18th century created a threat to its integrity. Both Turkey and Russia expected to get a share from the possible breakup of Persia, Turkey for this purpose enlisting the support of the Dagestan mountain people, Russia seeking support among Armenians and Georgians. In 1722, Peter the Great's Russo-Persian War (1722–23) began. At the very beginning, Russian forces succeeded in occupying Derbent and Baku. Armenians, encouraged by the Russians, united with Georgia and gathered an army in the Karabakh. However their hopes were deceived. Instead of the promised help, Peter the Great advised the Armenians of Karabakh to leave their homes and move to Derbent, Baku, Gilan, or Mazandaran, where Russian power had recently been established in the war. Khanates attached to Caspia, Russia signed a treaty with Turkey on July 12, 1724, giving the latter a free hand in the whole Transcaucasus as far as Shamakha. That year Ottoman troops invaded. Their main victims were the Karabakh Armenian population, who, headed