an informal basis, given the traditional category of visitors "in search of [religious and legal] knowledge" ("zuwwaar li'l-talab fii 'ilm"). In addition to being Muslim, prospective students of al-Qarawiyyin are required to have fully memorized the Quran, as well as other shorter medieval Islamic texts on grammar and Maliki law, and to be proficient in classical Arabic. Architecture of the mosque Al-Qarawiyyin Mosque was founded in the 9th century, but its present form is the result of a long historical evolution over the course of more than 1,000 years. Successive dynasties expanded the mosque until it became the largest in Africa, with a capacity of 22,000 worshipers. The present-day mosque covers an extensive area of about half a hectare. Broadly speaking, it consists of a large hypostyle interior space for prayers (the prayer hall), a courtyard with fountains (the sahn), a minaret at the courtyard's western end, and a number of annexes around the mosque itself. Historical evolution Early history (9th–10th centuries) The original mosque building was built in the 9th century. A major modern study of the mosque's structure, published by French archeologist and historian Henri Terrasse in 1968, determined that traces of the original mosque could be found in the layout of the current building. This initial form of the mosque occupied a large space immediately to the south of the sahn, in what is now the prayer hall. It had a rectangular floor plan measuring 36 by 32 meters, covering an area of 1520 square meters, and was composed of a prayer hall with four transverse aisles running roughly east–west, parallel to the southern qibla wall. It probably also had a courtyard of relatively small size, and the first minaret, also of small size, reportedly stood on the location now occupied by the wooden anaza (at the central entrance to the prayer hall from the courtyard). Water for the mosque was initially provided by a well dug within the mosque's precinct. As Fez grew and the mosque increased in prestige, the original building was insufficient for its religious and institutional needs. During the 10th century, the Umayyad Caliphate of Córdoba and the Fatimid Caliphate constantly fought for control over Fez and Morocco, seen as a buffer zone between the two. Despite this uncertain period, the mosque received significant patronage and had its first expansions. The Zenata Berber emir Ahmed ibn Abi Said, one of the rulers of