In 1619 the VOC opened a trading post in Palembang. Although it was closed a few years later by Jan Pieterszoon Coen, some contact was maintained with the town. The VOC's Resident in Jambi ordered pepper from the traders of Palembang, who sailed to Batavia themselves to sell the pepper. Because of the low profit yield for the Company, Batavia asked the sultan for permission to reopen the trading post in the town. The contract with the sultan gave the VOC Resident authority over all foreign ships calling at the harbour of Palembang. This enabled the Company to guard against illicit trading. Despite these privileges, the Company was still dependent on the sultan, who decided whether the Resident's demands were acceptable or not. In the 18th century Palembang supplied around 50,000 pounds of white pepper annually.