The
Japanese invasion of Taiwan (; ) (May–October 1895) was a conflict between the
Empire of Japan and the armed forces of the short-lived
Republic of Formosa following the
Qing Dynasty's cession of
Taiwan to Japan in April 1895 at the end of the
First Sino-Japanese War. The Japanese sought to take control of their new possession, while the Republican forces fought to resist Japanese occupation. 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. Although their advance was slowed by guerrilla activity, the Japanese defeated the Formosan forces (a mixture of regular Chinese units and local Hakka militias) whenever they attempted to make a stand. The Japanese victory at
Baguashan on 27 August, the largest battle ever fought on Taiwanese soil, doomed the Formosan resistance to an early defeat. The fall of Tainan on 21 October ended organised resistance to Japanese occupation, and inaugurated
five decades of Japanese rule in Taiwan.