Russo-Persian War of 1826–1828. In the subsequent war that raged, (Russo-Persian War (1826–1828)), the Qajarid Iranians suffered an even bigger disaster, as Russia occupied as far as Tabriz in mainland Iran. At the end of the war, in 1828, with the Treaty of Turkmenchay, Iran was forced to cede its territories comprising the Erivan Khanate (comprising modern-day Armenia), the Nakhichevan Khanate, as well as the remainder of the Republic of Azerbaijan that had not been ceded forcefully in 1813. By this time, in 1828, the century-long Iranian rule over Eastern Armenia had thus officially come to an end. Demographic shifts Until the late fifteenth century, Armenians had constituted a majority in Eastern Armenia. At the close of the fifteenth century, with the rise of the Safavids, Islam had become the dominant faith, and Armenians became a minority in Eastern Armenia. Some 80% of the population of Iranian Armenia were Muslims (Persians, Turkics, and Kurds) whereas Christian Armenians constituted a minority of about 20%, mainly because of the sixteenth-century wars with the Ottomans and the early seventeenth-century forced deportations of Armenians from the region by Shah Abbas I. As a result of the Treaty of Gulistan (1813) and the Treaty of Turkmenchay (1828), Iran was forced to cede Iranian Armenia (which also constituted the present-day Armenia), to the Russians. After the Russian administration took hold of Iranian Armenia, the ethnic make-up shifted, and thus for the first time in three centuries, ethnic Armenians started to form a majority once again in one part of historic Armenia. The new Russian administration encouraged the return of ethnic Armenians from Iran proper and Anatolia to their homeland. As a result, by 1832, the number of ethnic Armenians had matched that of the Muslims. Anyhow, it would be only after the Crimean War and the Russo-Turkish War of 1877–1878, which brought another influx of Turkish Armenians, that ethnic Armenians once again established a solid majority in Eastern Armenia. Nevertheless, the city of Erivan remained having a Muslim majority up to the twentieth century. According to the traveller H. F. B. Lynch, the city was about 50% Armenian and 50% Muslim (Azerbaijanis and Persians) in the early 1890s. Establishment of Russian rule Armenian patriots such as Bishop Nerses had hoped for an autonomous Armenia within the Russian Empire, but they were to be disappointed by the new government. Tsar Nicholas and his governor in Transcaucasia, Ivan