The Perak area, situated between Melaka and Kedah, was known as a rich source of tin. As early as the 17th century the VOC attempted to gain a monopoly on the tin produced in Perak, but failed. In 1655 the VOC established a trading post in Perak. However the area was wracked by wars between the various local population groups. In the 18th century the sultan of Perak started to value the maintenance of good relations with the Dutch, because he feared the Boeginese. In 1746 the VOC signed a contract with the sultan. For the sultan this meant greater security, while for the VOC it helped them in the tin trade. The contract granted the VOC permission for the establishment of a trading post near Tanjung Putus, on the mouth of the Perak River. The Company built a small stone fort here and stationed a bookkeeper there. Tin was an important product for the inter-Asian market. The bulk was intended for the Chinese market, and little found its way to Holland.