The taxi drops us off opposite the old Portuguese city of Mazagan. On first sight, its massive crenelated stone walls recall a location from Raiders of the Lost Ark. We have to resist its magnetism, at least temporarily. Our hotel is deep in the more modern, 19th-century medina opposite.

A call heralds a young man, who takes possession of our suitcase, wheeling it like a crazed four-wheel-driver through a maze of streets and alleys. Generously, he then retraces the route, minus the suitcase, carefully highlighting landmarks for orientation, delivering us back to the old city gates.

There are towns as exotic and enticing as this all over Morocco but this old quarter in the city of El Jadida on the Atlantic, known officially by its Portuguese name Mazagan, is one of the country's most recently listed UNESCO World Heritage sites.

Morocco has nine such sites, with another 11 on a tentative list. They date from a remarkable timeline of civilisations, reaching from the Palaeolithic era (20,000BC) and later, that of the indigenous Berbers, to the Romans, the Andalusians and last century, the French.

Walk in the main gate of Mazagan and the traffic of prosperous El Jadida, just 90 kilometres south-west of Casablanca, subsides.

Thankfully, no cars are allowed in the old town and tourism is only just starting, so it has an unhurried pace and locals are friendly and proud of the sites their pocket-sized old quarter preserves.

The Portuguese came to Morocco in the late 15th century. When they founded Mazagan in 1514, they also had settlements in Safi and Agadir to the south. They built a modest citadel atop a water cistern. By 1541, the Moroccans had turned against the Portuguese and the northerners consolidated here, expanding with massive ramparts and bastions.

"It shows how much the Portuguese loved it here," says my local guide, who now oversees Mazagan for Morocco's Ministry of Culture. "They built all this and then they stayed here for more than two centuries."

When the Portuguese finally left in 1769, the town was abandoned until the mid-19th century, when Sultan Moulay ordered it to be rehabilitated. The old mosque was rebuilt, the name Mazagan was banned and the city was renamed El Jadida: the new.

The real masterpiece of the Portuguese is one that was uncovered only accidentally, during the Moroccan reoccupation.

"At that time, there were many people who used to sell things in the outside chamber [of the citadel]," my guide explains. "In 1917 there was a grocer here [and] he wanted to enlarge his shop, so he began to dig. [When they dug through the inner wall], the people thought it was the sea, but they had discovered the cistern."

Building a cistern to gather and store water had been the first task of the Portuguese. Morocco, now as then, is famously short of fresh water, so the cistern was critical to survival, but because it was built during the Renaissance, it is both functional and extraordinarily beautiful.

Walking down the stairs from the outside chamber, which was once a local market, you enter a subterranean chamber with arched brick vaults supported on a forest of stone pillars. A central well spills light into the space and sets up a reflection in the water that still collects here.

Attributed to Joao Castilho, the cistern seems more like a cathedral than a practical structure. We revisit many times during our stay, much as you would the Duomo in Florence, or any other Renaissance masterpiece.

The cistern is on the main street of the old town. Accessed from this modest main axis are Mazagan's main landmarks, the Church of the Assumption, the rare octagonal-shaped minaret called El Brija, which predates the Portuguese settlement, and finally, the Sea Gate and the gracious old ramparts.

It is from the Sea Gate that the Portuguese are said to have made their final escape from Mazagan. Today, boys play soccer in the open space in front of the gate, while women stream in to deliver bread to be cooked in the wood-fired oven of the community bakery.

When we walk up onto the seawall, we tread carefully because the chimneys from the bakery penetrate the stonework.

There are still four bastions with their original cannons weary but intact. The fifth was blown up by the Portuguese when they left. One is named Saint Sebastian and is marked by a church of the same name. There were once five churches in Mazagan and several chapels. "Perhaps because they were circled by enemies, they needed spiritual reinforcement," my guide muses.

The churches, from an era when Jews, Muslims and Christians lived here harmoniously, have now all been deconsecrated.

My traditional Moroccan riad, Soleil d'Orient, deep in the main medina, is likewise delicious in its protective mood of calm.

In residence in the few rooms of our riad, all of which overlook a lush courtyard, are a young French family and a couple from the United States midwest. All of us are pleasantly surprised by the evening meal of chicken and apricot tagine and creme brulee - Moroccan with French finesse.

It feels to us like the centre of the universe, a sentiment the seafaring Portuguese no doubt felt too.

TRIP NOTES

GETTING THERE

Five trains leave Casablanca daily for El Jadida and buses run hourly. (It is about 2hr 30min one way.)

Alternatively, taxi fares can also be negotiated for about $98. Ask for advice at your hotel.

STAYING THERE

Riad Soleil D'Orient has doubles from about $152.5 a night. Book for dinner if you can - the French Moroccan cuisine is worth the $38. See riadsoleildorient.com. Rooms at L'Iglesia Hotel start at $218. See liglesia.com.