The kasbah was divided into three parts by inner walls which each had its own gate. The largest section was the caliph's palaces, covering about 24 hectares and occupying the entire eastern side of the kasbah.[1]:218 The second division was in the southwest corner, taking up about 12 hectares, and containing the various services required by the palace and government.[1] Notably, this district was centered around a large square or plaza known as the asaraq and which was the early equivalent of a mechouar.[1] From this square, a gate known as Bab ar-Riyad led to the caliph's palaces. Next to this gate was an audience pavilion, known as Qubbat al-Khilafa, which allowed the caliph to observe ceremonies taking place in front of the gate.[1]:221 The third section, more publicly accessible, occupied 8 hectares in the northwestern corner of the kasbah and contained the Kasbah Mosque and its annexes.