In 933, on the order of Hamid ibn Hamdan al-Hamdani the governor of Fes on behalf of the Fatimids, the "khutba" (Friday sermon) was transferred from the Mosque of the Sheikhs to the Andalusian Mosque, thus denoting the later as the main mosque of the district.