The Three Doors Mosque, also known as the Ibn Khayrun Mosque, is a Tunisian mosque located in the medina of Kairouan. Raised in the 9th century, it has the oldest carved and decorated mosque facade in the Islamic world. It is also one of the few well-preserved buildings from this period.
The Three Doors Mosque, a simple neighborhood oratory, was built around 252 of the Hegira (i.e. in 866) by the Andalusian merchant living in Kairouan, Muhammed bin Khairūn al-Ma’āfirī al-Andalusī. This is confirmed by the Andalusian historian Ibn Idhari (14th century) as well as by the inscription on the facade. Subsequently, the mosque underwent restoration work with the addition of a small minaret during the Hafsid period, around 1440.
At the exit of the souk, the mosque of the Three Doors is one of the oldest monuments of Kairouan (866). It has been remodeled several times but the facade has retained some of the characteristics of 9th century mosques. : three doors under arches, the one in the center being higher, which take up the classic arrangement of the porch of churches.
The Three Gates Mosque is essentially characterized by its facade with three doors surmounted by horseshoe arches, the oldest decorated mosque facade in the Islamic world. It is likely that it is inspired by that of Bû Fatata in Sousse (224-226 H./838-841) where, for the first time in Ifrîqiya, a Kufic writing carved in relief is found in a band carved into a basin.
Twenty-four carved consoles, close to those of the north entrance of the west facade of the Great Mosque of Kairouan, mark the upper limit. Just below, two bands inscribed in Kufic evoke the name of the founder and the date of construction. These two inscriptions frame a band consisting of alternating rectangular panels furnished with pairs of rosettes and plant motifs.
A third band inscribed in Kufic gives the date of the renovation (AH 844/AD 1440), during the Hafsid period (1228-1574).
Three doors occupy the facade, the middle one being higher and wider than the other two. These doors are surmounted by arches resting on marble columns, crowned by capitals. The spandrels of the arches are decorated with floral motifs composed of leaves with five or three open or folded lobes.
The Three Doors Mosque is related to the facade of the Bâb al-Mardûm Mosque (San Cristo de la Luz, Toledo, 10th century) decorated with a Kufic inscription topped with corbel bricks.
At the northeast corner stands a square-based minaret from the Hafsid period, pierced with twin windows framed with ceramic tiles. Its model is inspired by the Andalusian type minarets which spread in Tunisia from the Almohad-Hafsid era.
The prayer hall, which is accessed directly from the street because this oratory has no courtyard, is very simple: it is made up of three naves parallel to the qibla wall and three bays covered with groin vaults made of bricks, falling on round horseshoe arches resting on columns, the prototype of which has been perpetuated in Tunisia since Roman times.
Note that one of the arcades of the prayer room of the oratory has preserved a carved wooden bedstead decorated with floral and stylized motifs showing a striking kinship with certain panels of the minbar of the Great Mosque of Kairouan, itself same heir to the Umayyad models, and confirms its Ifrîqiyan origin, which has been disputed several times, without denying the Mesopotamian influences and its similarity with the decorations carved on wood made in the eastern regions of the Islamic world.