Andalusian Mosque: An Idrisid-Era Sunni Mosque in Fez, Morocco
Site at a Glance
- Rating
- 4.6
- Popularity
- Low
- Country
- Morocco
- Primary era
- Medieval
- Eras represented
- Medieval
- Civilizations
- Almohad, Marinid, Umayyad
- Site type
- Religious
- Remains
- Mosque
On this page18 sections
History
The Andalusian Mosque is a historic Sunni mosque in Fez, Morocco, founded in 859–860 during the Idrisid period, when the dynasty was establishing Fez as a major political and religious center. It is one of Morocco’s oldest mosques and one of the relatively few surviving establishments from the Idrisid era.
Foundation and Andalusi Community
The mosque was founded by Maryam bint Mohammed ibn Abdullah al-Fihri, the sister of Fatima al-Fihri, who established the Qarawiyyin Mosque at approximately the same time. Local residents of Andalusi background also supported its construction. The surrounding district became associated with Andalusi immigrants, many of whom had reached Fez in 818 after fleeing Cordoba following a failed uprising and severe repression under the Umayyad emir al-Hakam I. Their community gave the mosque its name.
Fatimid and Umayyad Rivalry
During the tenth-century competition between the Fatimids, a Shiite caliphate that ruled parts of North Africa and later Egypt, and the Umayyads of Cordoba, who ruled al-Andalus and claimed a rival caliphate, both the Andalusian Mosque and the Qarawiyyin Mosque received patronage from opposing factions. In 933, the Zenata governor Hamid ibn Hamdan al-Hamdani, a vassal of the Fatimid ruler Ubayd Allah, transferred the Friday khutbah, the formal sermon delivered during congregational prayer, to the Andalusian Mosque. This made it the principal mosque of the Andalusian Quarter, replacing the older Mosque of Al-Ashyakh.
In 956, Abd al-Rahman III, the Umayyad caliph of Cordoba, sponsored the mosque’s minaret. The construction was carried out by the local Zenata governor Ahmed ibn Abi Said, an Umayyad vassal, while Abd al-Rahman III’s personal involvement beyond providing funds remains uncertain. In 980, Buluggin, a Zirid amir ruling in the name of the Fatimids, commissioned a new minbar, the raised pulpit used for the Friday sermon. Its decoration expressed the Fatimid victory over rival factions, including the Sunni Umayyads of Cordoba.
After Fez was retaken for Cordoba in 985, the minbar was partly remade with elements associated with the Umayyads. These included an inscription dated 985 or 986 that names Ibn Abi Amir and Hisham II. The earlier inscription dated 980 was retained, perhaps because its significance was not recognized by the craftsmen who altered the pulpit.
Almohad Reconstruction
The Almohads, a North African Islamic dynasty that ruled Morocco and much of the western Islamic world during the twelfth and thirteenth centuries, ordered a major rebuilding of the mosque. After learning that repairs were needed, the Almohad caliph Muhammad al-Nasir commissioned work carried out between 1203 and 1207. An anaza, a marker or screen indicating the prayer direction, was installed in 1209. The largely uniform fabric of the present building suggests that this campaign reconstructed most of the mosque.
The rebuilding enlarged the mosque and added a monumental northern gate, a fountain, a separate entrance for the women’s prayer hall, and an apartment above that hall for the imam. An ablutions facility, or dar al-wudu, was built across the street, while a new water channel brought water directly from outside the city. The earlier Oued Masmuda supply may have been considered too polluted because it crossed much of the city.
Marinid Repairs and Institutions
The quality of the Almohad masonry led to substantial repairs in the late thirteenth century. At the request of the mosque’s khatib, the official who delivered the Friday sermon, Abu Abdallah Muhammad ibn Abd al-Qasim ibn Hassuna, the Marinid sultan Abu Yaqub Yusuf authorized work in 1295–1296. Much of the structure, including its pillars and ceilings, was restored.
During the reign of Abu Thabit in 1307–1308, workers repaired the Almohad water canals and installed an ornamental courtyard fountain. The eastern gate near the minaret was probably built or decorated in the fourteenth century, perhaps under Abu Thabit. The Marinid period also probably saw the construction of the Dar al-Muwaqqit, an apartment associated with the mosque’s timekeeper, who regulated prayer times.
The mosque provided seven educational courses and contained two libraries, making it the second most important mosque in the Fez medina. In the early fourteenth century, the Marinids founded the nearby Sahrij Madrasa and Sba’iyyin Madrasa. These institutions provided teaching and accommodation for students from outside Fez who came to study at the mosque. In 1415, the Marinid sultan Abu Said Uthman III apparently established a large storage space at the mosque’s rear that served as a library. Other carved-wood elements in this area, around the imam’s door, and in the rear funerary mosque were also attributed to his reign.
Later Restoration and Study
The mosque underwent repeated restorations that preserved its form. Its monumental gate probably acquired its present appearance during the Alawi period, the era of the dynasty that later ruled and continues to rule Morocco. Moulay Ismail renovated the Marinid courtyard fountain. During the French Protectorate period, Henri Terrasse carried out a comprehensive study of the mosque and its minbar, publishing the results in 1942.
The Andalusian Mosque forms part of the historic heritage of Fez and is regarded as one of the city’s principal landmarks. Its successive phases include the Idrisid foundation, Umayyad and Fatimid patronage, Almohad reconstruction, Marinid repairs and institutional additions, and later Alawi restoration.
Remains
Prayer Hall and Courtyard
The original mosque was a modest hypostyle building, meaning that its roof was supported by rows of columns or pillars, with a small sahn, or courtyard. A walnut tree and several other trees were planted there. The prayer hall contained six aisles, or possibly seven according to al-Jazna’i, formed by parallel rows of horseshoe arches resting on stone columns. These rows originally ran east to west, parallel to the southern qibla wall, the wall oriented toward the direction of prayer, rather than perpendicular to it. The mosque also had abundant water from the artificial Oued Masmuda channel.
The Almohad rebuilding replaced the earlier stone-column arrangement with brick pillars and produced the relatively uniform fabric visible through much of the present building. The current prayer-direction alignment appears to differ from the orientation preserved by the tenth-century minaret. The mosque’s mihrab, the prayer niche set into or beside the qibla wall, has carved stucco decoration that was remade at a later date and is no older than the eighteenth century.
Minaret and Gates
Tenth-Century Minaret
The tenth-century minaret survives with a square base, one principal shaft, small merlons, and a dome. It resembles the contemporary minaret of the Qarawiyyin Mosque, although it is slightly smaller and simpler. The tower was probably first placed at the mosque’s northwestern corner before the later expansion. Its alignment appears to preserve the older orientation of the mosque rather than the alignment of the present qibla wall.
Northern and Eastern Gates
The monumental northern gate has a tall facade decorated with zellij, a Moroccan mosaic technique made from individually cut and assembled glazed tiles, together with an elaborate carved-wood canopy. These features were probably restored later, and little of the original Almohad decoration remains. The eastern gate near the minaret was probably built or decorated during the fourteenth century.
Waterworks and Courtyard Features
Water Supply and Ablutions Facility
The Almohad expansion included an ablutions house, or dar al-wudu, across the street from the mosque. A new channel supplied this facility and the mosque with water from outside the city, replacing or supplementing the earlier Oued Masmuda supply.
Marinid Fountain
A courtyard fountain installed during the Marinid period stands on the courtyard’s north wall. Moulay Ismail later renovated it, and his name remains visible on the fountain.
Rear Rooms and Institutional Spaces
Dar al-Muwaqqit
The Dar al-Muwaqqit is a second-floor apartment on the southeast side of the minaret. It probably dates from the Marinid period and was associated with the mosque’s timekeeper, whose role was to regulate the hours of prayer.
Library and Funerary Mosque
At the rear of the mosque is a large storage space with double doors and a panel bearing a cursive inscription above them. The room appears to have served as a library. The rear area also contains the imam’s door and the funerary mosque known as the Jama’ al-Gna’iz.
Minbar
The tenth-century minbar was commissioned in 980 and partly remade after the Umayyad reconquest of Fez in 985. Its surviving inscriptions include one dated 980 and another dated 985 or 986, the latter naming Ibn Abi Amir and Hisham II. Rather than replacing the pulpit, the Almohads restored and reused it. Most of its sides were covered with new carved wooden panels in the Moorish style of the period, which was strongly influenced by Andalusi craftsmanship, while the upper rear panel with tenth-century Umayyad inscriptions was retained.
Henri Terrasse rediscovered the original minbar panels during twentieth-century restoration work. The tenth-century pulpit, associated with both Fatimid and Umayyad phases of the mosque’s history, is now displayed at the Dar Batha Museum in Fez rather than remaining in the mosque.


