and demanded Georgia's reversal to traditional allegiance to Iran. Disappointed by his failure, Heraclius, then over 75, retired to his native Telavi, leaving Alexander in charge of restoring Tiflis. Break with George XII After the death of Heraclius in 1798, Alexander, together with his mother Darejan and brother Iulon, led opposition to the accession of his half-brother, George XII. The conflict between the sons of Heraclius had already been brewing during their father's lifetime, and now evolved into an open confrontation. Alexander occupied the Muslim-majority districts of Kazakh, Borchalo, and Shamshadil, and refused to obey the new king. Being in ill-health and weakened, George XII relied on the Russian protection. Alexander, suspecting that the Russian presence in the country would eventually lead to an outright annexation, was persuaded by the shah of Iran, Fath Ali Shah Qajar, to leave Georgia and join his forces with Omar Khan, the ruler of the Avars in Dagestan and an erstwhile enemy of Heraclius II, in 1799. Fath Ali rewarded Alexander's defection by promising to support his claim to the Georgian throne. Alexander began raising an army and issued an appeal to the people of Kartli and Kakheti, trying to justify his new alliance with the traditional foes of the Georgians and swearing by the grave of Saint Nino that the Avar army was being assembled not to ravage the country, but to defend Alexander's right to the throne. At the same time, he sent letters to his mother and brothers, assuring that they would be saved from the Russian oppression. In November 1800, Alexander and Omar Khan led their forces into Kakheti, but they were met and decisively defeated by a combined Russo-Georgian army on the banks of the Iori river on 7 November 1800. Wounded in action, Omar Khan retreated to the mountains of Dagestan, while Alexander and his followers fled to Ibrahim Khalil Khan of Karabakh, and then to Dagestan. In the meantime, the defeat of his allies convinced Fath Ali not to proceed with his planned invasion of Georgia and he recalled his army to Tabriz. Declared by the Russians a traitor to be taken dead or alive, Alexander thus began three decades of resistance. Struggle against Russia Russo-Persian war After King George XII's death in December 1800, the Russian government prevented his heir Prince David from assuming the throne and brought Kartli and Kakheti more closely under its control.