section_path: History/Qing rule (1683–1895)
section_name: Qing rule (1683–1895)
paragraph_text: Qing rule (1683–1895)
  
  Following the defeat of Koxinga 's grandson by an armada led by Admiral Shi Lang in 1683, the Qing dynasty formally annexed Taiwan in May 1684, making it a prefecture of Fujian province while retaining its administrative seat (now Tainan) under Koxinga as the capital.
  
  The Qing government generally tried to restrict migration to Taiwan throughout the duration of its administration because it believed that Taiwan could not sustain too large a population without leading to conflict. After the defeat of the Kingdom of Tungning, most of its population in Taiwan was sent back to the mainland, leaving the official population count at only 50,000, including 10,000 troops. Despite official restrictions, officials in Taiwan solicited settlers from the mainland, causing tens of thousands of annual arrivals by 1711. A permit system was officially recorded in 1712, but it likely existed as early as 1684; its restrictions included only allowing those to enter who had property on the mainland, family in Taiwan, and who were not accompanied by wives or children. Many of the male migrants married local Indigenous women. Over the 18th century, restrictions were relaxed. In 1732, families were allowed to move to Taiwan. By 1811, there were more than two million Han settlers in Taiwan, and profitable sugar and rice production industries provided exports to the mainland. In 1875, restrictions on entering Taiwan were repealed.
  
  Three counties nominally covered the entire western plains, but actual control was restricted to a smaller area. A government permit was required for settlers to go beyond the Dajia River. Qing administration expanded across the western plains area over the 18th century due to continued illegal crossings and settlement. The Taiwanese Indigenous peoples were categorized by the Qing administration into acculturated aborigines who had adopted Han culture and non-acculturated aborigines who had not. The Qing did little to administer or subjugate them. When Taiwan was annexed, there were 46 aboriginal villages under its control, likely inherited from the Kingdom of Tungning. During the early Qianlong period there were 93 acculturated villages and 61 non-acculturated villages that paid taxes. In response to the Zhu Yigui settler rebellion in 1722, separation of aboriginals and settlers became official policy via 54 stelae used to mark the frontier boundary. The markings were changed four times over the latter half of the 18th century due to continued settler encroachment. Two aboriginal affairs sub-prefects, one for the north and one for the south, were appointed in 1766.
  
  During the 200 years of Qing rule in Taiwan, the Plains Indigenous peoples rarely rebelled against the government and the mountain Indigenous peoples were left to their own devices until the last 20 years of Qing rule. Most of the more than 100 rebellions during the Qing period, such as the Lin Shuangwen rebellion, were caused by Han settlers. Their frequency was evoked by the common saying "every three years an uprising, every five years a rebellion" (三年一反、五年一亂), primarily in reference to the period between 1820 and 1850.
  
  Many officials stationed in Taiwan called for an active colonization policy over the 19th century. In 1788, Taiwan Prefect Yang Tingli supported the efforts of a settler named Wu Sha to claim land held by the Kavalan people. In 1797, Wu Sha was able to recruit settlers with financial support from the local government but was unable to officially register the land. In the early 1800s, local officials convinced the emperor to officially incorporate the area by playing up the issue of piracy if the land was left alone. In 1814, some settlers attempted to colonize central Taiwan by fabricating rights to lease aboriginal land. They were evicted by government troops two years later. Local officials continued to advocate for the colonization of the area but were ignored.
  
  The Qing took on a more active colonization policy after 1874 when Japan invaded Indigenous territory in southern Taiwan and the Qing government was forced to pay an indemnity for them to leave. The administration of Taiwan was expanded with new prefectures, sub-prefectures, and counties. Mountain roads were constructed to make inner Taiwan more accessible. Restrictions on entering Taiwan were ended in 1875 and agencies for recruiting settlers were established on the mainland, but efforts to promote settlement ended soon after. In 1884, Keelung in northern Taiwan was occupied during the Sino-French War but the French forces failed to advance any further inland while their victory at Penghu in 1885 resulted in disease and retreat soon afterward as the war ended. Colonization efforts were renewed under Liu Mingchuan. In 1887, Taiwan's status was upgraded to a province. Taipei became the permanent capital in 1893. Liu's efforts to increase revenues on Taiwan's produce were hampered by foreign pressure not to increase levies. A land reform was implemented, increasing revenue which still fell short of expectation. Modern technologies such as electric lighting, a railway, telegraph lines, steamship service, and industrial machinery were introduced under Liu's governance, but several of these projects had mixed results. A campaign to formally subjugate the Indigenous peoples ended with the loss of 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 Indigenous peoples. Indigenous 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.