It was laid out in the late 18th century as a planned fortified port, using the European military architecture of the day in a North African setting, and from the start it was a busy port for international trade, tying Europe and the rest of the world to Morocco and the Saharan lands behind it. UNESCO inscribed it as a World Heritage Site in 2001.
Sultan Mohammed ben Abdallah founded the city, with the architect Théodore Cornut among those behind its early design; from 1767 Ahmed El Eulj directed the planning of the city and its medina. The result is unusually regular for a medina: two main streets crossing at right angles, Avenue Mohamed Zerktouni and Rue Mohamed El Qory, split the walled town into four rough quarters. Each street ends at a city gate, except the northern end of Rue Mohamed El Qory, which stops at the wall, and the streets are mainly for people on foot.
Among the gates are Bab Doukkala in the northeast, Bab Marrakesh in the southeast and the port gate in the southwest, whose pediment carries the Hijri date 1184. Within the walls, visitors will find towers, markets, handicraft stalls and narrow alleys, and along the seaward ramparts the Skala de la Ville is lined with cannon. The fortified port lies apart from the walled town, across a stretch of land to the west.
The western part near the port is the Kasbah district, historically home to merchants, officials, foreigners and well-off Muslims and Jews, and once the site of churches, a palace and a synagogue. In the northeast corner of the medina is the mellah, the Jewish Quarter, developed around 1807 or 1808, where the Slat Lkahal Synagogue stands.




