Tainan City () is a city in Southern Taiwan. It is the fifth largest city after Taipei, Kaohsiung, New Taipei City and Taichung City. Tainan was the capital of Taiwan in 1661 when Koxinga took the island from Dutch colonial rule. In 1684, the Qing Dynasty conquered Taiwan and created "Taiwan Fu" (the first local government in Taiwan). This was later renamed to "Tainan Fu" in 1885. Because it was the capital of Taiwan, Tainan is also called Fu-cheng (Government City). Tainan was also the capital of the Republic of Formosa. Tainan is one of the oldest cities in Taiwan, with the Dutch port at An-ping (安平) in 1624. It is also one of Taiwan's cultural capitals, as it built the First Confucian School/Temple on the island. There are remains of the Northern and Southern gates of the old city, and other old monuments. Tainan is the city with the most Buddhist and/or Taoist temples on Taiwan. Tainan City is surrounded by Tainan County to the north and east and the South China Sea to the west and south.