By the mid-17th century, Batavia, the headquarter of VOC in Asia, had become an important trade centre in the region. It had repelled attacks from the Javanese Mataram kingdom. In 1641, the Dutch captured Malacca from the Portuguese, thus weakened Portuguese position in Asia. The Dutch defeated the Sulawesi city of Makassar in 1667 thus bringing its trade under VOC control. Sumatran ports were also brought under VOC control and the last of the Portuguese were expelled in 1660. In return for monopoly control over the pepper trade and the expulsion of the English, the Dutch helped the son of the ruler of Banten overthrow his father in 1680. By the 18th century, the VOC has established themselves firmly in Indonesian archipelago, controlling inter-island trade as part of their Asian business which includes India, Ceylon, Formosa, and Japan. VOC has established their important bases in some ports in Java, Maluku, and parts of Sulawesi, Sumatra, and Malay Peninsula.