The dynasty reached its high point in the late 18th century, then gradually declined in the face of challenges from abroad, internal revolts, population growth, disruption of the economy, corruption, and the reluctance of ruling elites to change their mindsets. The population rose to some 400 million, but taxes and government revenues were fixed at a low rate, leading to fiscal crisis. Following the Opium Wars, European powers led by Great Britain imposed "unequal treaties", free trade, extraterritoriality and treaty ports under foreign control. The Taiping Rebellion (1850–1864) and the Dungan Revolt (1862–1877) in Central Asia led to the death of some 20 million people, due to famine, disease, and war. In spite of these disasters, in the Tongzhi Restoration of the 1860s, Han Chinese elites rallied to the defense of the Confucian order and the Manchu rulers. The initial gains in the Self-Strengthening Movement were lost in the First Sino-Japanese War of 1895, in which the Qing lost its influence over Korea and the possession of Taiwan. New Armies were organized, but the ambitious Hundred Days' Reform of 1898 was turned back in a coup by the conservative Empress Dowager Cixi (1835–1908), who had been the dominant voice in the national government (with one interruption) after 1861. When the Juye Incident by foreign powers triggered the violently anti-foreign and anti-imperialist "Boxers" in 1900, with many foreigners and Christians killed, the foreign powers invaded China. Cixi sided with the Boxers and was decisively defeated by the eight invading powers, leading to the flight of the Imperial Court to Xi'an.