Hopes for an early end to the war proved to be premature. By the end of June it was clear that all the island's main towns would have to be occupied forcibly before opposition to the Japanese invasion collapsed. Popular resistance to the Japanese invasion gradually grew, slowing the pace of their advance south from Taipei, and on 26 June the presidency of the Formosan Republic was assumed by Liu Yongfu in Tainan. This gesture, which effectively transferred the republican capital from Taipei to Tainan, prolonged the Republic's life for another five months.