Tainan (Chinese 臺南市, Pinyin Táinán Shì, W.-G. T'ai-nan-shih, Zhuyin ㄊㄞˊ ㄋㄢˊ ㄕˋ, Pe̍h-ōe-jī Tâi-lâm-chhī - "Southern Taiwan City") is the oldest and sixth largest city in Taiwan with around 1.9 million inhabitants. Located in southwest Taiwan, the city is one of the country's six self-government cities.
Archaeological excavations in Zuozhen District suggest that the region of present-day Tainan has been inhabited for at least 20,000 to 31,000 years. The native Siraya tribe ruled the region in the 16th century. The Sakam people of the Sinkan sub-tribe inhabited the area of today's city. Other Sirayan tribes including the Soelangh, Mattauw and Baccloangh settled the area.
Tainan was established as a Dutch colonial city in the 1620s because of its convenient port location. Early Dutch colonists had attempted to control Macau and the Penghu Islands but were unsuccessful. In July 1622, therefore, the cloth merchant Cornelis Reyersz of the Dutch East India Company sailed to Taiwan to find a suitable location for establishing a trading post. In 1624, he founded a small fortress called "Orange" on the sandy Tayouan Peninsula (present-day Anping, which is a district of Tainan). The fort was then expanded and renamed Fort Zeelandia. The settlement was originally conceived as a staging post and base from which to attack Spanish rivals and as a trading post between China and Batavia in Indonesia. During the tenure of Pieter Nuyts (1627–1629), hostilities broke out between the Dutch and Japanese traders, resulting in Nuyts being taken hostage by a Japanese trader, Hamada Yahee. In 1662 Zheng Chenggong expelled the Dutch garrison and in 1684 Tainan (under the name Taiwan-Fu, "Taiwan government") became the capital of Taiwan Prefecture.
At that time there was the Taijiang Lagoon (台江內海, Táijiāng Nèihǎi - "Taijiang Inland Sea") in the area of today's Tainan, which was shielded from the open sea by a long spit, and Fort Zeelandia was located at one of the lagoon exits. After a storm and major flood in 1823, the Zengwen River changed course, causing large amounts of sediment to enter the lagoon, which gradually became silted up. The Sicao Lagoon in the district of Annan, the Qigu Lagoon in the district of the same name and the Kunshen Lagoon in the southern district still exist today as remnants of the former 'inland sea'. Taipei in the north of the island only became the capital in the 19th century. During the period of Japanese rule in Taiwan (1895-1945), Tainan was increasingly overtaken in growth by Kaohsiung (1895-1945: Takao) further south, whose port and industry were systematically expanded. From October 1, 1920, Tainan was the administrative center of Tainan Prefecture. After the end of Japanese rule and the takeover of the island of Taiwan by the Republic of China, the prefecture was transformed into Tainan County on January 7, 1946. The cities of Tainan and Chiayi were spun off from the county and given the status of county-level cities. On October 25, 1950, the northern portions of Tainan County were split off as new counties of Chiayi and Yunlin. The boundaries of Tainan City and County remained unchanged thereafter, until December 25, 2010, when the county was dissolved and incorporated into the city. This was then given the status of a city directly under the government. All previous counties were given city district status. On February 6, 2016, the city was hit by the 2016 Kaohsiung earthquake, which damaged buildings and infrastructure and claimed 116 lives