In 1821, during the last major Ottoman-Persian War, the Ottomans were decisively defeated at Erzurum by the Iranian Qajars at the Battle of Erzurum (1821). In 1829 the city was captured by the Russian Empire, but was returned to the Ottoman Empire under the Treaty of Adrianople (Edirne), in September of the same year. During the Crimean war Russian forces approached Erzurum, but did not attack it because of insufficient forces and the continuing Russian siege of Kars. The city was unsuccessfully attacked (Battle of Erzurum (1877)) by a Russian army in the Russo-Ottoman War of 1877–78. However, in February 1878, the Russians took Erzurum without resistance, but it was again returned to the Ottoman Empire, this time under the Treaty of San Stefano. There were massacres of the city's Armenian citizens during the Hamidian massacres (1894–1896).