The Almohad kasbah was a vast self-contained district surrounded by ramparts and further subdivided by inner walls. It included not only the royal palace (known as the Dar al-Khalifa[1] or Qasr al-Khilafa[2]), but also the congregational mosque (the Kasbah Mosque), markets and qaysariyya (bazaar), a madrasa, bathhouses (hammams), warehouses, stables, cemeteries, gardens, and squares.[1][3][6][7] The expansion of the city also included the founding of a hospital (maristan), the location of which is unclear.[1][6] The main public entrance to the kasbah was the Bab Agnaou, a gate located in the kasbah's northwestern corner and accessed from inside the city walls.[1][2] Despite some modifications, it is still well-preserved today and features extensive stone-carved decoration. Another gate, the Bab as-Sadat, allowed direct entrance into the kasbah from outside the city walls but was reserved for high officials and members of the royal dynasty.[1] The Almohads also built vast pleasure gardens around the kasbah, such as the Agdal Gardens to the south which were surrounded by walls.[2][1][5] A gate known as the Bab al-Bustan allowed direct access between the caliph's palace and the gardens.[1]