 In its shadow, between 1654 and 1657 the Dutch possessed a factory for trade with Kedah.In 1710, the Dutch captured the fort after a massacre of Dutch crew by men from Kedah.However they later evacuated it before a succession dispute arose, and Muhammad Jiwa Zainal Adilin II of Kedah, with the help of the Bugis, established himself as Sultan after the death of his brother.