Taipei City is the capital of the Republic of China (Taiwan). Situated at the northern tip of the island of Taiwan, Taipei is located on the Tamsui River; it is about southwest of Keelung, a port city on the Pacific Ocean. It lies in the two relatively narrow valleys of the Keelung (基隆河) and Xindian (新店溪) rivers, which join to form the Tamsui River along the city's western border. The city proper (Taipei City) is home to an estimated 2,618,772 people. Taipei, New Taipei, and Keelung together form the Taipei metropolitan area with a population of 6,900,273. However, they are administered under different local governing bodies. "Taipei" sometimes refers to the whole metropolitan area, while "Taipei City" refers to the city proper. Taipei City proper is surrounded on all sides by New Taipei.
Taipei is the political, economic, and cultural centre of Taiwan. The National Palace Museum which has one of the largest collections of Chinese artifacts and artworks in the world is located in Taipei. Considered to be a global city, Taipei is part of a major industrial area. Railways, high speed rail, highways, airports, and bus lines connect Taipei with all parts of the island. The city is served by two airports – Taipei Songshan and Taiwan Taoyuan.
Taipei was founded in the early 18th century and became an important center for overseas trade in the 19th century. The Qing Dynasty of China made Taipei the provincial capital of Taiwan in 1886. When the Japanese acquired Taiwan in 1895 after the First Sino-Japanese War, they retained Taipei as the capital of the island, and also advanced extensive urban planning in Taipei. The Republic of China took over the island in 1945 following Japanese surrender. After losing Mainland China to the Chinese Communist Party in the Chinese Civil War, the ruling Kuomintang (KMT) resettled the ROC government to Taiwan and declared Taipei the provisional capital of the Republic of China in December 1949.
The region known as the Taipei Basin was home to Ketagalan tribes before the eighteenth century. Han Chinese mainly from Fujian Province of China began to settle in the Taipei Basin in 1709. In the late 19th century, the Taipei area, where the major Han Chinese settlements in northern Taiwan and one of the designated overseas trade ports, Tamsui, were located, gained economic importance due to the booming overseas trade, especially that of tea exportation. In 1875, the northern part of Taiwan was separated from Taiwan Prefecture and incorporated into the new Taipei Prefecture as a new administrative entity of the Chinese government (Qing Dynasty). Having been established adjoining the flourishing townships of Bangka, Dalongdong, and Twatutia, the new prefectural capital was known as Chengnei, "the inner city", and government buildings were erected there. From 1875 (during the Qing Dynasty) until the beginning of Japanese rule in 1895, Taipei was part of Tamsui County of the Taipei Prefecture and the prefectural capital. In 1886, when Taiwan was proclaimed a province of China, Taipei city was made the provincial capital. Taipei remained a temporary provincial capital before it officially became the capital of Taiwan in 1894. All that remains from the old Qing Dynasty city is the north gate. The west gate and city walls were demolished by the Japanese while the south gate, little south gate, and east gate were extensively modified by the Kuomintang (KMT) and have lost much of their original character.
As settlement for losing the First Sino-Japanese War, China ceded the island of Taiwan to the Empire of Japan in 1895 as part of the Treaty of Shimonoseki. After the Japanese take-over, Taipei, called Taihoku in Japanese, was retained as the capital and emerged as the political center of the Japanese Colonial Government. During that time the city acquired the characteristics of an administrative center, including many new public buildings and housing for civil servants. Much of the architecture of Taipei dates from the period of Japanese rule, including the Presidential Building which was the Office of the Taiwan Governor-General.
During Japanese rule, Taihoku was incorporated in 1920 as part of Taihoku Prefecture. It included Bangka (艋舺), Twatutia (大稻埕), and Jōnai (城內) among other small settlements. The eastern village Matsuyama (松山庄) was annexed into Taihoku City in 1938. Upon the Japanese defeat in the Pacific War and its consequent surrender in August 1945, the Kuomintang (Chinese Nationalist Party) assumed control of Taiwan. Subsequently, a temporary Office of the Taiwan Province Administrative Governor was established in Taipei City.
Under the Republic of China
On December 7, 1949, the KMT government under Chiang Kai-shek, after being forced to flee mainland China by the Communists at the Chinese Civil War, declared Taipei as the provisional capital of the Republic of China, with the official capital at Nanjing (Nanking).
Taipei expanded greatly in the decades after 1949, and as approved on December 30, 1966 by the Executive Yuan, Taipei was declared a special centrally administered municipality on July 1, 1967 and given the administrative status of a province. In the following year, Taipei City expanded again by annexing Shilin, Beitou, Neihu, Nangang, Jingmei, and Muzha. At that time, the city's total area increased fourfold through absorbing several outlying towns and villages and the population increased to 1.56 million people.
The city's population, which had reached one million in the early 1960s, also expanded rapidly after 1967, exceeding two million by the mid-1970s. Although growth within the city itself gradually slowed thereafter — its population had become relatively stable by the mid-1990s — Taipei remained one of the world's most densely populated urban areas, and the population continued to increase in the region surrounding the city, notably along the corridor between Taipei and Keelung. In 1990, the then 16 districts in Taipei City were consolidated into the current 12 districts.