In the First Sino-Japanese War, China suffered a crushing defeat. In 1895, the Qing government was forced to sign the Treaty of Shimonoseki with Japan, ceding the Liaodong Peninsula, the entire island of Taiwan, and the Penghu Islands to Japan.
The period from 1895 to 1945 became the era of Japanese occupation in Taiwan. On April 26, 1923, Japan's crown prince Hirohito (Emperor Showa, who later launched the war of aggression against China) visited Taiwan for "inspection" and awarded medals to the imperial gentleman Koo Hsien-ei and others.
The Governor-General's Office of Taiwan (in 1895, the institution set up by Japan to rule Taiwan) organized local people and students to hold a huge welcoming ceremony, and the Japanese flag flew everywhere throughout Taiwan for a while.