Taiwan (Chinese: 臺灣 or 台灣; pinyin: Táiwān), officially the Republic of China (Chinese: 中華民國), is a country in East Asia. Originally based in mainland China, the Republic of China now governs the island of Taiwan (known in the past as Formosa), which forms over 99% of its current territory, as well as Penghu, Kinmen, Matsu, and other minor islands. Neighboring states include the People's Republic of China to the west, Japan to the east and northeast, and the Philippines to the south. Taipei is the capital city and economic and cultural center of the region, and New Taipei, which surrounds Taipei is the largest city by population.
The earliest evidence of Taiwan being inhabited is from the late Paleolithic era. The island of Taiwan was mainly inhabited by Taiwanese aborigines before being colonized in the 17th century by the Dutch as Dutch Formosa in 1624 and the Spanish as Spanish Formosa in 1626. The Spanish were expelled from the island in 1644 by the Dutch. The first Han Chinese polity on Taiwan began when Koxinga's troops defeated Dutch forces and established the Kingdom of Tungning. The island was subsequently ruled by the Qing Dynasty after the kingdom's defeat in the Battle of Penghu in 1683, a period that lasted for over 200 years. Following Japan's victory over the Qing Dynasty in the first Sino-Japanese war, Taiwan was ceded to Japan under the Treaty of Shimonoseki in 1895.
The Republic of China was established in mainland China in 1912 and governed varying amounts of the mainland until 1949. At the end of World War II, Japan surrendered Taiwan and associated islands to ROC forces. When Communist forces took control of mainland China and founded the People's Republic of China (PRC) in 1949, the ROC government moved to Taiwan. The ROC government still officially claims to represent all of China, in a definition including Taiwan, but has not made retaking the mainland a political goal since 1992.