The Kasbah (ksar), a group of earthen buildings surrounded by high walls, is a traditional pre-Saharan habitat. The houses crowd together within the defensive walls, which are reinforced by corner towers. Ait-Ben-Haddou, in Ouarzazate province, is a striking example of the architecture of southern Morocco.
Located in the foothills on the southern slopes of the High Atlas in the Province of Ouarzazate, the site of Ait-Ben-Haddou is the most famous ksar in the Ounila Valley. The Ksar of Aït-Ben-Haddou is a striking example of southern Moroccan architecture. The ksar is a mainly collective grouping of dwellings. Inside the defensive walls which are reinforced by angle towers and pierced with a baffle gate, houses crowd together – some modest, others resembling small urban castles with their high angle towers and upper sections decorated with motifs in clay brick – but there are also buildings and community areas. It is an extraordinary ensemble of buildings offering a complete panorama of pre-Saharan earthen construction techniques. The oldest constructions do not appear to be earlier than the 17th century, although their structure and technique were propagated from a very early period in the valleys of southern Morocco. The site was also one of the many trading posts on the commercial route linking ancient Sudan to Marrakesh by the Dra Valley and the Tizi-n’Telouet Pass. Architecturally, the living quarters form a compact grouping, closed and suspended. The community areas of the ksar include a mosque, a public square, grain threshing areas outside the ramparts, a fortification and a loft at the top of the village, an caravanserai, two cemeteries (Muslim and Jewish) and the Sanctuary of the Saint Sidi Ali or Amer. The Ksar of Ait- Ben-Haddou is a perfect synthesis of earthen architecture of the pre-Saharan regions of Morocco.