Towards the end of the First Sino-Japanese War, having defeated the Qing in northern China, Japan sought to ensure that it obtained Penghu and Taiwan in the final settlement. In March 1895, the Japanese defeated the Chinese garrison on the islands and occupied Makung. The Japanese occupation of Penghu, with its fine harbor, gave the Imperial Japanese Navy an advanced base from which their short-range coal-burning ships could control the Taiwan Straits and thus prevent more Chinese troops from being sent to Taiwan. This action persuaded the Chinese negotiators at Shimonoseki that Japan was determined to annex Taiwan, and, after Penghu, Taiwan and the Liaodong Peninsula had been ceded to Japan in the Sino-Japanese Treaty of Shimonoseki in April, helped to ensure the success of the Japanese invasion of Taiwan in May.