In the summer of 1805, Russian troops on the Askerani River near Zagam defeated the Iranian army during the 1804–13 Russo-Persian War and saved Tbilisi from reconquest now that it was officially part of the Imperial territories. Russian suzerainty over eastern Georgia was officially finalized with Iran in 1813 following the Treaty of Gulistan. Following the annexation of eastern Georgia, the western Georgian kingdom of Imereti was annexed by Tsar Alexander I. The last Imeretian king and the last Georgian Bagrationi ruler, Solomon II, died in exile in 1815, after attempts to rally people against Russia and to enlist foreign support against the latter, had been in vain. 