Taiwan, officially the Republic of China, is a partially recognised state in East Asia. Its neighbors include the People's Republic of China to the west, Japan to the northeast, and the Philippines to the south. Taiwan is the most populous state and largest economy that is not a member of the United Nations.
The island of Taiwan, formerly known as Formosa, was inhabited by aborigines before the 17th century, when Dutch and Spanish colonies opened the island to mass Han immigration. After a brief rule by the Kingdom of Tungning, the island was annexed by the Qing dynasty, the last dynasty of China. The Qing ceded Taiwan to Japan in 1895 after the Sino-Japanese War. While Taiwan was under Japanese rule, the Republic of China was established on the mainland in 1912 after the fall of the Qing dynasty. Following the Japanese surrender to the Allies in 1945, Republic of China took control of Taiwan. However, the resumption of the Chinese Civil War led to the Republic of China's loss of the mainland to the Communists, and the flight of the Republic of China government to Taiwan in 1949.