As early as the 17th century, Moulay Ismaïl, who was looking for allies against Spain, had excellent relations with Louis XIV of France.
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.