During the supremacy of the Barbary Coast pirates in the 16th and 17th centuries , Formentera was so vulnerable it had to be abandoned , and it wasn 't resettled until the 18th century .
The supremacy of the Barbary coast pirates was settled in the 14th century .