The island flourished as a trading post on the route between China and India, and over the centuries it came under the control of the Chinese, the British, and then the Dutch when it was declared part of the Dutch East Indies through the Anglo-Dutch Treaty of 1824.