Republic of Formosa
The Republic of Formosa survived for only five months. The Japanese landed near Keelung on the northern coast of Taiwan on 29 May 1895, and in a five-month campaign swept southwards to Tainan. During the night of 4 June, on the news that the Japanese had captured Keelung, President T'ang and General Chiu fled to Tamsui, and from there sailed for the mainland on the evening of 6 June. The Japanese entered Taipei shortly afterwards.
Capitulation of Tainan
After the Qing Empire signed the Treaty of Shimonoseki, officials on Taiwan opposed to the cession of Taiwan to Japan proclaimed an independent Republic of Formosa and raised forces in order to resist the impending Japanese invasion. On 6 June 1895, in the wake of the Imperial Japanese Army's successful landing and occupation of northern Taiwan, President Tang Jingsong fled the island. On 26 June the former-Qing garrison commander and vice-president of the Republic of Formosa Liu Yongfu announced his succession as head of government, and used his base in Tainan as the capital of the second republic.