In 1762, the Kakhetian Kingdom was united with the neighboring Georgian Kingdom of Kartli into the Kingdom of Kartli-Kakheti under King Heraclius II. Following the Treaty of Georgievsk and the sack of Tbilisi by Agha Mohammad Khan, in 1801 the Kingdom of Kartli-Kakheti was annexed to the Russian Empire. Russian suzerainty over Kakheti and the rest of Georgia was recognized by Qajar Iran in the 1813 Treaty of Gulistan.