Militarily superior, the Russians ended the Russo-Persian War of 1804–1813 with a victory. By the Treaty of Gulistan that followed, Iran was forced to cede the Ganja Khanate to Russia. The Iranians briefly managed to oust the Russians from Ganja during the 1826 offensive during the Russo-Persian War of 1826–1828, but the resulting Treaty of Turkmenchay made its inclusion into the Russian Empire definite. It was renamed Elisabethpol (Russian: Елизаветполь) after the wife of Alexander I of Russia, Elizabeth, and in 1868 became the capital of Elisabethpol Governorate. Elizavetpol was an uyezd of Tiflis Governorate before 1868. The Russian name was not accepted by Azerbaijanis who continued to call the city "Ganja".