The Qing dynasty in the late 19th and early 20th centuries was challenged by civil unrest and foreign invasions ever since they lost the Sino-Japanese War in 1895. Internal rebellions and their repression brought millions of deaths, conflicts with foreign Western European powers brought humiliating unequal treaties, exacted reparations that burdened the fiscal system, and compromised the country's territorial integrity. Popular sentiment among Han Chinese grew that political power should return to the majority Han Chinese from the minority Manchus. Following the Boxer Rebellion and the invasion of the imperialist powers to put it down, the Qing Imperial Court launched fundamental institutional and political reforms, such as abolishing the Imperial examination system in 1905, drafting a constitution in 1906, the establishment of provincial legislatures in 1909, and the preparations for electing a national parliament in 1910. However, Manchu conservatives in the Qing Court thought these reforms went too far and distrustful critics felt they did not go far enough. Reformers were either imprisoned or executed outright. The failures of the Imperial Court to enact such political liberalization and modernization caused the reformists to take the road of revolution.