or from its beginning. Major mosques in the early Islamic period were typically multi-functional buildings where teaching and education took place alongside other religious and civic activities. The al-Andalusiyyin Mosque, in the district across the river, may have also served a similar role up until at least the Marinid period, though it never equaled the Qarawiyyin's later prestige. It is unclear at what time al-Qarawiyyin began to act more formally as an educational institution, partly because of the limited historical sources that pertain to its early period. The most relevant major historical texts like the Rawd al-Qirtas by Ibn Abi Zar and the Zahrat al-As by Abu al-Hasan Ali al-Jazna'i do not provide any clear details on the history of teaching at the mosque, though al-Jazna'i (who lived in the 14th century) mentions that teaching had taken place there before his time. Otherwise, the earliest mentions of halaqa (circles) for learning and teaching may not have been until the 10th or the 12th century. Historian Abdelhadi Tazi indicates the earliest clear evidence of teaching at al-Qarawiyyin in 1121. Moroccan historian Mohammed Al-Manouni believes that the mosque acquired its function as a teaching institution during the reign of the Almoravids (1040–1147). Historian Évariste Lévi-Provençal dates the beginning of teaching to the Marinid period (1244–1465). In the 10th century, the Idrisid dynasty fell from power and Fez was contested between the Fatimid and Córdoban Umayyad caliphates and their allies. During this period, the Qarawiyyin Mosque progressively grew in prestige. At some point the khutba (Friday sermon) was transferred from the Shurafa Mosque of Idris II (today the Zawiya of Moulay Idris II) to the Qarawiyyin Mosque, granting it the status of Friday mosque (the community's main mosque). This transfer happened either in 919 or in 933, both dates that correspond to brief periods of Fatimid domination over the city, and suggests that the transfer may have occurred by Fatimid initiative. The mosque and its learning institution continued to enjoy the respect of political elites, with the mosque itself being significantly expanded by the Almoravids and repeatedly embellished under subsequent dynasties. Tradition was established that all the other mosques in Fez based the timing of their call to prayer (adhan) according to that of al-Qarawiyyin. Apogee during the Marinid period Many scholars consider al-Qarawiyyin's high point as an intellectual and scholarly center to be in the 13th and 14th centuries, when the curriculum