Even though it is signposted opposite the entrance to the Ben Youssef medersa, the Almoravid Koubba (aka Koubba Ba'adiyn) is easy to pass by- a small, two-storey Kiosk, which at first seems little more than a grey dome and a handful of variously shaped doors and windows. Look closed, though, and you may begin to understand its significance and even fascination. For this is the only intact surviving Almoravid building, and it is at the root of all Moroccan architecture. The motifs you've just seen in the medersa -the pinecones, palms and acanthus leaves -were all carved here for the first time. The windows on each of the different sides became the classic shapes of Almohad and Merenid design -as did the merlons, the Christmas tree-like battlements; the complex "ribs" on the outside of the dome; and the dome's interior support, a sophisticated device of a square and star-shaped octagon, which is itself repeated at each of its corners. Once you see all this, you're only a step away from the eulogies of Islamic art historians who sense in this building, which was probably a small ablutions annexe to the original Ben Youssef Mosque, a powerful and novel expression of form.
Excavated only in 1952 -having been covered over amid the many rebuildings of the Ben Youssef mederssa - the koubba lies just the south of the present (mainly nineteenth-century) Ben Youssef Mosque. It is mostly below today's ground level, though standing with your black to the mosque you can make out the top of its dome behind the long, low brick wall. There is an entrance gate down a few steps, opposite the Ben Youssef Mosque, where a gardien will emerge to escort you round and sell you ticket (10dh), and may also show you the huge, old water conduits nearby, which brought water from the Atlas. If the koubba is closed, you can get almost as good a view from the roof of very ancient (but still active) hammam down to the right; the attendants will give you access for a small tip.