Taiwan, officially the Republic of China (ROC), is a country in East Asia. The main island of Taiwan, also known as Formosa, lies between the East and South China Seas in the northwestern Pacific Ocean, with the People's Republic of China (PRC) to the northwest, Japan to the northeast, and the Philippines to the south. It has an area of 35,808 square kilometres (13,826 square miles), with mountain ranges dominating the eastern two-thirds and plains in the western third, where its highly urbanized population is concentrated. The combined territories under ROC control consist of 168 islands in total covering 36,193 square kilometres (13,974 square miles). The largest metropolitan area is formed by Taipei (the capital), New Taipei City, and Keelung. With around 23.9 million inhabitants, Taiwan is among the most densely populated countries.
Taiwan has been settled for at least 25,000 years. Ancestors of Taiwanese indigenous peoples settled the island around 6,000 years ago. In the 17th century, large-scale Han Chinese immigration began under Dutch colonial rule and continued under the Kingdom of Tungning, the first predominantly Han Chinese state in Taiwanese history. The island was annexed in 1683 by the Qing dynasty and ceded to the Empire of Japan in 1895. The Republic of China, which had overthrown the Qing in 1912 under the leadership of Sun Yat-sen, assumed control following the surrender of Japan in World War II. But with the loss of mainland China to the Communists in the Chinese Civil War, the government moved to Taiwan in 1949 under the Kuomintang (KMT).