
The island of Taiwan (formerly known as "Formosa") was mainly inhabited by Taiwanese aborigines until the Dutch and Spanish settlement during the Age of Discovery in the 17th century, when Han Chinese began immigrating to the island. In 1662, the pro-Ming loyalist Koxinga expelled the Dutch and established the first Han Chinese polity on the island, the Kingdom of Tungning. The Qing dynasty of China later defeated the kingdom and annexed Taiwan. By the time Taiwan was ceded to Japan in 1895, the majority of Taiwan's inhabitants were Han Chinese either by ancestry or by assimilation. The Republic of China (ROC) was established in mainland China in 1912. After Japan's surrender in 1945, the ROC assumed its control of Taiwan. Following the Chinese civil war, the Communist Party of China took full control of mainland China and founded the People's Republic of China (PRC) in 1949. The ROC relocated its government to Taiwan, and its jurisdiction became limited to Taiwan and its surrounding islands, with the main island making up 99% of its de facto territory. Despite this, the ROC continued to represent China at the United Nations until 1971, when the PRC assumed China's seat via Resolution 2758 and the ROC lost its UN membership. International recognition of the ROC has gradually eroded as most countries switched recognition to the PRC. 21 UN member states and the Holy See currently maintain official diplomatic relations with the ROC. It has unofficial ties with most other states via its representative offices.