Amid the Qing conquest, the Ming partisan Koxinga invaded Dutch Taiwan to use as a base for assaults along China's coast.
In 1858, four ports were opened in Anping, Ta-kau, Keelung, and Tamsui as a result of pressures from the British and French Empires after the Second Opium War.