It used to be mainly hippies or France's designer élite who relished the technicolour hedonism of Marrakesh.
Now French and British entrepreneurs are snapping up magnificent town houses ("riads") in the old centre and restoring them as havens of discreet luxury for a wider public. The change has stiffened laidback Marrakesh, adored by Yves Saint Laurent and celebrated in the movie Hideous Kinky, with a sharp business edge.
Eight years ago, the Englishman Peter Dyer gave up his lectureship at Loughborough University to restore a faded palace in the kasbah, the ancient royal enclosure. He is now completing a doctoral thesis on Marrakesh's social and architectural transformation and runs his Maison Mnabha as a guesthouse.
"The old centre or medina used to have a mixed population, with rich and poor living side by side," he said.
"Then after independence from France in 1956, the prosperous merchant families and court officials moved out to the French quarter.
"They took over the luxury homes, garages, gardens and swimming pools of the departing colonial élite, which they considered more convenient and modern."
Mr Dyer's fin-de-siècle house, with its sumptuous arched and pillared salon and twin terraces that command Marrakesh's skyline of minarets, mosques and the flat slats of the souk, was owned by a pasha, a senior court official.
"During the Sixties, the kasbah filled with country people looking for work, and apart from pleasure palaces bought by Yves Saint Laurent or Pierre Balmain, the mansions were rented as tenements , or fell to ruin. Behind their blank walls, they're the most spacious and elegant houses in Marrakesh," Mr Dyer said.
By the late 1990s, adventurous French and British started to put money into the gorgeous homes with their opulent guest rooms, patios and women's quarters, turning them into small hotels, restaurants and galleries. "It's the only way to preserve them; there are no state funds," Mr Dyer said.
In the souk a few narrow streets away, Berber women from the High Atlas mountains sit by skeins of cream wool they have brought to have dyed. One lifts a strand of forest green she wants to match to finish a carpet. The dour-faced dye man, stained to his elbows and ankles, promises to mix a vat to match her strand.
An old man trusted by all wanders from merchant to merchant, a carpet slung from his shoulder, ultramarine and crimson folds tumbling to the floor. He murmurs to each the highest bid, and passes the whispered response to the next bidder. As the afternoon progresses, each carpet dealer accumulates a gorgeous pile at his feet.
Tourists buy them, of course, but also new proprietors eager to adorn their restored mansions. Pascal Beherac, a Parisian hotelier, bought the ravishing Villa des Orangers (Orange Tree Villa), with its tiled courtyard and rose-petal-filled fountain, three years ago "on a whim".
He said: "I came to Marrakesh on holiday with my wife Veronique. I fell in love with this place and bought it on the spot and moved here with my wife and children. My friends thought I was crazy."
Local craftsmen with skills of centuries at their fingertips were key to successful restoration. Max Laurence, a young British developer who restored a riad and is building old-style apartments in a nearby Berber village, explained that techniques of tiling, brickmaking, ironwork and marble-like "tadlekt" plasterwork had been dying out, "but then young men who went to college found they couldn't get jobs, so they turned to the skills of their fathers". To encourage the new generation of tourists, authorities cleaned streets and installed discreetly ubiquitous policemen, often in plain clothes, so even single northern females may comfortably walk the souk's labyrinthine alleyways.
Mr Beherac said: "People want more comfort than hippy flophouses, and more intimacy than luxury hotels. We treat people as if they were a pasha in their own home. We think of it as part house, part garden, part paradise."
Tourism is slack these days in what should be Marrakesh's peak season. "But it's wonderful just now. This is the moment to come," he said.Reuse content