The provincial capital of Erivan was a center of the Iranian defenses in the Caucasus during the Russo-Iranian Wars of the 19th century. As a result of the Iranian defeat in the last Russo-Iranian War, it was occupied by Russian troops in 1827 and then ceded to the Russian Empire in 1828 in accordance with the Treaty of Turkmenchay. Immediately following this, the territories of the former Erivan Khanate and the neighboring Nakhchivan Khanate were merged to form the Armenian Oblast of the Russian Empire.