Some contacts continued during the 18th century, as when the French engineer Théodore Cornut designed the new harbour of Essaouira for King Mohammed ben Abdallah from 1760. In 1767, France established a treaty with Morocco, which gave her consular and diplomatic protection. This treaty would become a model for other European powers for the following years.[7]