Shortly after the VOC had established itself on the west coast of Formosa, the Spaniards established a rivalling colony on northern Taiwan. On the island Keelung (now known as Heping Island) they built fort San Salvador. After 1636, when the Spanish governer of the Philippines decided to withdraw most of the Spanish troops from Taiwan, the VOC saw a chance to drive the Spaniards from the island. In 1642, it succeeded in conquering the Spanish forts on northern Taiwan.
In 1662, the VOC abandoned northern Taiwan in the wake of the invasion of Southwestern Taiwan by the Chinese warlord Koxinga. In 1664, during the alliance between the Qing and the VOC, it was briefly re-occupied, and the forts were rebuilt. As the trade with China did not revive, the post was once again abandoned in 1668.