on the hill outside Rabat, in an idyllic location dotted with remains of Roman villas, Abu al-Hasan decided to honour Abu Yacud Yusuf, who met his death at the battle of Algeciras,with a necropolis of a particular form, in which numerous other members of the Merinid dynasty were to be subsequently interred. The enormous complex is ringed by what looks like a formidable defensive enceinte wall, though in fact its purpose is more metaphoric. An inscription defines it as ribat and exalts jihad. it stresses the role of the dynasty in defending and proselytizing the faith, to the detriment of the populace who, encouraged by the Sufi mystics, increasingly turned in religious matters to marabouts (saints and hermits and,by extention,their mausoleums, to which particular powers are still attributed). the monumental entrance is flanked by towers on an octagonal plan crowned by an unusual square summit, the transition to which is ensured by a stone muqarnas squinch: an imaginative variation on the typically Almohad motif of the gateway.