a third of the army after fierce resistance from the Mkgogan and Msbtunux peoples. Liu resigned in 1891 due to criticism of these costly projects. By the end of the Qing period, the western plains were fully developed as farmland with about 2.5 million Chinese settlers. The mountainous areas were still largely autonomous under the control of aborigines. Aboriginal land loss under the Qing occurred at a relatively slow pace due to the absence of state sponsored land deprivation for the majority of Qing rule. Qing rule ended after the First Sino-Japanese War when it ceded Taiwan and the Penghu islands to Japan on 17 April 1895, according to the terms of the Treaty of Shimonoseki. Japanese rule (1895–1945) Following the Qing defeat in the First Sino-Japanese War (1894–1895), Taiwan, its associated islands, and the Penghu archipelago were ceded to the Empire of Japan by the Treaty of Shimonoseki, along with other concessions. Inhabitants on Taiwan and Penghu wishing to remain Qing subjects and not to become Japanese had to move to mainland China within a two-year grace period. Very few Formosans saw this as feasible. Estimates say around four to six thousand departed before the expiration of the grace period, and two to three hundred thousand followed during the subsequent disorder. On 25 May 1895, a group of pro-Qing high officials proclaimed the Republic of Formosa to resist impending Japanese rule. Japanese forces entered the capital at Tainan and quelled this resistance on 21 October 1895. About 6,000 inhabitants died in the initial fighting and some 14,000 died in the first year of Japanese rule. Another 12,000 "bandit-rebels" were killed from 1898 to 1902. Several subsequent rebellions against the Japanese (the Beipu uprising of 1907, the Tapani incident of 1915, and the Musha incident of 1930) were all unsuccessful but demonstrated opposition to Japanese colonial rule. The colonial period was instrumental to the industrialization of the island, with its expansion of railways and other transport networks, the building of an extensive sanitation system, the establishment of a formal education system, and an end to the practice of headhunting. During this period, the human and natural resources of Taiwan were used to aid the development of Japan. The production of cash crops such as sugar greatly increased, especially since sugar cane was salable only to a few Japanese sugar mills, and large areas were therefore diverted from the production of