sentences:  He aspired to bring most of the Muslim-ruled territory from the Caucasus mountains as far south as Tabriz under his sway, but eventually he had to curb his efforts in the face of the rising Qajar power in Iran.He was then allied with the Georgian king Erekle II of Kartli-Kakheti and the two interfered in the affairs of the Erivan khanate and made the Ganja khanate their puppet.The alliance waned after Erekle accepted the Russian protectorate in the treaty of Georgievsk in 1783.