Although Perak nobles had destroyed the earlier store structure, on orders from the Dutch base in Batavia, a fort was built on Pangkor Island in 1670 as a warehouse to store tin ore mined in Perak. This warehouse was also destroyed in further attacks in 1690, but was repaired when the Dutch returned with reinforcements. In 1747, Sultan Muzaffar Riayat Shah III, who held power in the area of Upper Perak, signed a treaty with Dutch Commissioner Ary Verbrugge under which Perak's ruler recognised the Dutch monopoly over the tin trade, agreed to sell all tin ore to Dutch traders, and allowed the Dutch to build a new warehouse fort on the Perak River estuary. With construction of the new warehouse near the Perak River, the old warehouse was abandoned permanently and left in ruins.