The expansionist Russian Empire abused the power vacuum created with the death of Nader Shah in 1747 and following power struggles in Iran to install its own puppet king Heraclius in Georgia. A Russian contingent of two infantry battalions with four artillery pieces arrived in Tbilisi in 1784, but was forced to withdraw due to public resistance. Meanwhile, Iran was consumed in a power struggle between the Zand Dynasty and the emerging Qajar tribal leader Agha Mohammad Khan who came up victorious and proclaimed Shah of Iran. Shortly after his coronation ceremony in a tent on the Norooz of 1795, Agha Mohammad Khan resolved to bring back Caucasia into Persian orbit. In August, 1795 Agha Mohammad Khan led his 35,000-strong army into the Caucasus and secured alliance from khans of Ganjeh and Erivan. He then marched directly on Tbilisi, and attacked the heavily fortified Georgian positions.Abandoned by Russians who did not take such risks as engaging a strong army, Heraclius started a desperate resistance and succeeded in rolling back a series of Persian attacks on September 9 and 10. Early on September 11, Agha Mohammad Khan personally led an all-out offensive against the Georgians. Amid an artillery duel and a fierce cavalry charge, the Persians managed to cross the Kura River and outflanked the decimating Georgian army. A few hours after Heraclius escaped to the mountains, Agha Mohammad Khan was in full control of the Georgian capital. He sacked Tbilisi and massacred the population. After installing a governor, the Persian army marched back victorious with booty and young female captives.To restore Russian prestige, Catherine II declared war on Persia and sent an army under Valerian Zubov in the Qajar possessions, but her successor Paul I shortly recalled it. Agha Mohammad Shah was assassinated in Shusha during another expedition of Caucasia in 1797. In 1813, under Fathali Shah, Iran abandoned all claims to Caucasia by the infamous Gulistan Treaty.On April 9, 1991, shortly before the collapse of the USSR, Georgia declared independence.