Beach getaways don’t usually feature stone ramparts – unless of course you happen to be a Barbary pirate in Essaouira, in which case they are handy for spotting the English Armada coming to steal sugar. From the 16th to the 19th Century, the port serviced European nobility’s cravings for cake, and the whitewashed fortifications harboured unimaginable treasures in sugar and spice.

Tastes have changed, as has Essaouira. Each morning, fleets of cobalt blue boats still head out from port, scattering across a vast Atlantic horizon - but now the daily haul is sea bass, not sugar. The city's main citadel today houses a contemporary art gallery, Galerie Borj, and the city's southern gates open onto a stretch of sandy beach. Where pirates once lurked, kite surfers pass daydreamers in flowing ghandouras (traditional indigo-hued garments).

Essaouira's grand archways and wide streets were designed by French architect and POW Théodore Cornut. Legend has it that Sultan Sidi Mohammed ben Abdallah was so impressed by his design for the city, that Cornut was granted his freedom. Sunny boulevards are lined with whitewashed buildings - blank canvases interrupted only by blue window frames and awnings.

Inside cupboard-sized shops, shelves are stacked with jars of ochre and purple powder. The yellow powders are saffron-spice blends to make Essaouira's signature fish tagine, but the mysterious purple pigment is what first made Essaouira's reputation, some 2,000 years ago. Murex violet from the nearby Îles Purpuraires (Purple Islands) was the envy of Roman emperors, who bought it to dye their imperial togas, and for centuries artisans guarded the secret to extracting the valuable pigment from murex snail shells.

Today, local artist Souad Attabi makes no secret of the sources for her abstract paintings depicting Berber talismans, hung at the Bab Sebaa Gallery. "For my work, I use henna and spices - they have a long history here, but offer fresh possibilities in painting," she says. Now that its glory days as the North African spice port are past, Attabi says her hometown is free to harbour big ideas. "Essaouira is full of meaningful pauses, empty spaces that invite the mind to wander."

Further information
Essaouira is 2½ hours by car or coach from Marrakesh. Three coaches a day depart from the Supratours headquarters, just west of the train station. See for surfing lessons and rentals

Where to Stay
Midrange: Once the home of an imam (a leader in the Islamic faith), Dar Liouba lies in the heart of the medina. The rooms all lead off a central spiral staircase and are decorated in Essaouira's trademark cobalt blue and white (from £50).

Top end: L'Heure Bleue, formerly the residence of Moroccan nobility, has been beautifully restored; rooms look onto a central courtyard where breakfast and afternoon mint tea is served and there's a rooftop pool (from £250).


The article 'Morocco’s best for coastal retreats: Essaouira' was published in partnership with Lonely Planet Magazine.