Mosque of Ibn Tulun: The Congregational Mosque of al-Qata’i in Cairo
Site at a Glance
- Popularity
- Very High
- Country
- Egypt
- Primary era
- Medieval
- Eras represented
- Medieval, Modern
- Civilizations
- Fatimid, Mamluk
- Site type
- Religious
- Remains
- Mosque
On this page17 sections
History
The Mosque of Ibn Tulun is a congregational mosque in Cairo, Egypt, built for al-Qata’i, the new capital established by Ahmad ibn Tulun. Construction began around 876–877 and was completed in 879. Ibn Tulun, an Abbasid military governor who founded an autonomous dynasty in Egypt, commissioned it for his court and troops. The mosque is regarded as Egypt’s oldest substantially preserved mosque. The older Mosque of ‘Amr also survives, although repeated rebuilding changed its original character.
Foundation and religious role
Al-Qata’i was the third Egyptian capital to have a congregational mosque, following Fustat, the country’s first Muslim capital, and nearby al-‘Askar, founded later by the Abbasids. The Mosque of Ibn Tulun served the new capital’s Friday worshippers. Its planned cost was 100,000 dinars, but construction cost 120,000. A local tradition says the money came from treasure discovered on the hill. Another story tells that worshippers initially questioned the funds’ origins, until Ibn Tulun swore they came from that treasure.
Stories also connect the mosque’s main prayer niche to a dream in which the Prophet Muhammad indicated its position; ants were said to have gathered at the spot. A separate tradition credits Ibn Tulun with dismissing workers early during Ramadan so they could prepare food for their children, a practice said to have continued afterward. Once the mosque opened, scholars and legal experts taught there. Judge Bakkar ibn Qutayba led prayers, while al-Rabi‘ ibn Sulayman taught hadith, reports about the Prophet Muhammad. Worshippers attended Friday prayers and lessons. During the Fatimid period, a ruling dynasty in Egypt, caliph al-Hakim sent 814 copies of the Qur’an to the mosque.
Survival and medieval use
In 905, Abbasid general Muhammad ibn Sulayman al-Katib destroyed al-Qata’i while restoring Abbasid control over Egypt. The mosque and Ibn Tulun’s adjoining administrative palace were spared. Later, the Ikhshidids, another ruling house in Egypt, used the palace as an administrative centre. The mosque became the only surviving monument of al-Qata’i.
Under Fatimid rule, caliph al-‘Aziz ordered the courtyard fountain rebuilt in 995 after it burned in 986. The mosque was one of four where the Fatimid caliph led Friday prayers. An epidemic and famine in 1077 contributed to damage; vizier Badr al-Jamali, a senior minister, repaired the building and its foundations. An inscription above the main entrance commemorates that work. Badr’s son and successor as vizier, al-Afdal Shahanshah, installed a prayer niche in 1094. Caliph al-Hafiz ordered further work in 1131–1132, though its extent is unclear.
During the 12th century, North African pilgrims traveling to the Hijaz, a region of western Arabia that includes Mecca and Medina, lodged in the mosque. Under Saladin, founder of the Ayyubid dynasty, a North African community used it for more than a generation. In 1263, Mamluk sultan Baybars, a ruler from Egypt’s military elite, used the mosque’s annexes to store grain.
Mamluk renovations and later medieval changes
After Mamluk sultan al-Ashraf Khalil was assassinated in 1293, Lajin, an accomplice in the plot, hid in the ruined mosque. He vowed to restore it if he survived and became sultan. After gaining power, he fulfilled the vow with a major renovation in 1296. He also established teaching in the four Sunni schools of Islamic law, Qur’anic interpretation, hadith, and medicine, and supported a Qur’an school for Muslim orphans. The chief judge took charge of the mosque’s administration, with Badr al-Din Ibn Jama‘a as its first supervisor.
In the 14th century, an emir renewed teaching in the Hanafi school, providing for seven teachers and monthly payments of money and wheat for students. Sultan al-Nasir Muhammad ibn Qalawun added two cylindrical brick minarets at the eastern ends of the prayer hall. One was later removed because of its condition; the other was demolished in 1933 for structural reasons. A prayer arcade was built beside the principal minaret in 1390, when an ablution facility was also renewed. In the 16th century, a prayer room and tomb were built beside the minaret. Attributed to Sheikh Sharaf al-Din al-Madini or Sheikh al-Bushi, they were demolished in 1943.
Changing uses and conservation
Under Muhammad Bey Abu al-Dhahab, the mosque became a woollen-blanket workshop. In the early 19th century it was successively used as a military hospital, a salt warehouse, and a blacksmith’s workshop. In 1846, French physician and official Clot Bey received permission from Muhammad Ali, then ruler of Egypt, to convert it into an asylum. The building later served as a poorhouse until the early 1880s.
In 1880, Julius Franz Pasha, head of the government body responsible for conserving historic monuments, closed the building and removed its residents. Restoration between 1890 and 1918 cleared debris, removed later structures from the prayer galleries, and repaired the main dome, minarets, pulpit, and stucco windows. King Fuad I attended Friday prayers there in 1918, the first Egyptian ruler to do so since Lajin; this prompted further clearance and repairs. The conservation committee rebuilt the prayer-hall ceiling in 1927 and repaired collapsed arches in 1928–1929. After the prayer room and tomb were removed in 1943, the western outer-enclosure walls were rebuilt in 1947–1948. The committee’s dissolution in 1961 was followed by a period of neglect, before government restoration resumed in 1978.
The 1992 Cairo earthquake caused limited damage, but weakened the top of the minaret. A major restoration in 2002–2004 included stone paving in the courtyard; decoration was restored in 2005. The paving contributed to moisture accumulating in the walls, which were treated with a consolidant, and scholars of Islamic architecture criticized aspects of the work. In 2014, thieves stole brass hinges bearing Mamluk-period Islamic inscriptions from the pulpit door. Police recovered them the following month and arrested the thieves. The mosque remains active and forms part of Historic Cairo, a UNESCO World Heritage property inscribed in 1979.
Remains
The mosque stands on the rocky rise of Gebel Yashkur, traditionally translated as Hill of Thanksgiving. Its nearly square complex combines roofed galleries around an open courtyard with an outer enclosure on three sides. Brick is the principal building material, with timber roofs and stucco decoration; the minaret is built of stone. The mosque is raised above the surrounding ground, and steps lead to its inner entrances.
Plan and building fabric
Courtyard and galleries
The overall plan measures about 162.25 by 161.50 metres, while the mosque and its walls occupy a rectangle of about 137.80 by 118.10 metres. Including the outer enclosure, the complex covers approximately 26,318 square metres. The open courtyard measures about 92.35 by 91.80 metres and is surrounded by roofed galleries. The southeastern gallery, on the qibla side facing Mecca, serves as the prayer hall and has five aisles; each of the other galleries has two. Brick piers carry the galleries instead of rows of reused marble columns. They support pointed arches, and their rounded corners have attached columns with shaped capitals. The southern foundations rest on bedrock, while those on the northern side reach about five metres deep.
Outer enclosure
The outer enclosure, an open boundary around the mosque, separates it from the surrounding urban area. It originally held ablution facilities, latrines, and a medical clinic. Shops and local markets were associated with its outer walls, and adjoining market structures were removed in the early 20th century. The enclosure has 19 entrances paired with openings into the mosque, as well as three additional openings in the qibla wall. Some doorways retain old wooden elements decorated with leaf patterns.
Walls, windows, and decoration
Openwork brick battlements crown the mosque’s outer walls and those of the enclosure. Upper walls have pointed windows, with small columns beside some openings. The mosque contains 128 windows with stucco grilles in varied geometric patterns. Three or four grilles date to Ibn Tulun’s period; others reflect later repairs, including at least six from Lajin’s restoration. Carved stucco covers parts of the arches, their undersides, and the capitals of the attached columns. Its geometric and floral designs follow forms associated with Samarra, an Abbasid capital in present-day Iraq. Original bright paint has faded, while the southwestern arches retain much of their carved underside decoration. Rosettes flank windows on the courtyard façades.
Prayer hall and interior features
Prayer niches
The tallest of the six prayer niches, or mihrabs, is the main niche in the qibla wall, which faces Mecca. Its concave form is framed in stucco and flanked by pairs of marble columns with capitals linked to the Egyptian Christian tradition. These features are attributed to the Tulunid period, while the niche’s interior decoration was renewed under Lajin. Painted wood appears above marble panels, and a glass-mosaic band carries the Shahada, the Islamic declaration of faith, in Naskhi, a flowing style of Arabic script. A wooden panel above it bears an inscription in Kufic, an angular Arabic script. The niche points 14 degrees southwest of the correct direction of prayer, and its alignment was not changed.
The other five niches are flat stucco recesses from different periods. They include a small niche in the qibla wall, two on piers beside the raised platform, and two associated with al-Afdal Shahanshah and Lajin. The pair beside the platform have Samarra-style decoration and Kufic inscriptions of the Shahada that omit Ali’s name. Al-Afdal’s niche refers to Fatimid caliph al-Mustansir and the Shi’a form of the declaration; the original is held at Cairo’s Museum of Islamic Art, and a replica stands in the mosque. A damaged niche on a pier carries a version referring instead to Lajin.
Inscriptions, platform, pulpit, and dome
A wooden frieze runs beneath the ceiling around the mosque’s walls. Its Kufic Qur’anic inscription extended for about two kilometres and contained roughly one-fifteenth of the Qur’an. The surviving text is fragmented and includes passages from the chapters al-Baqara and Al ‘Imran.
A raised platform between piers in the prayer hall was used by callers to prayer and Qur’an reciters. It probably dates to the Mamluk period. Beside the main prayer niche, the wooden pulpit, or minbar, has a staircase leading to a small kiosk-like top with a curved finial. Its inscription attributes it to Lajin and dates it to 1296. The panels are made from Indian teak and ebony, carved with leaf designs.
A dome above the main prayer niche rises from a square base. Muqarnas, tiered ornamental forms used to make architectural transitions, carry the change from the square base to an octagonal level and then to the dome’s circular base. Wood conceals these forms.
Courtyard and outer structures
Courtyard fountain
The courtyard fountain is housed in a square stone kiosk, open through arches on all four sides and capped by a brick dome. Inside is an octagonal stone basin; a marble surround once around the basin has been replaced by modern paving. Tiered ornamental forms in the dome’s corners support a stucco Qur’anic inscription, with more Qur’anic text in a carved stucco medallion at the top. The kiosk’s earlier stepped battlements have disappeared. The original fountain had a domed canopy supported by ten gilded-marble columns and encircled by sixteen additional columns.
A small room above the kiosk’s thicker northeastern wall was reached by a staircase. It appeared in 19th-century photographs and was removed in the early 20th century. Its purpose is uncertain. A sundial mentioned in Lajin’s inscription may have been associated with this room and with the mosque’s timekeeper.
Minaret
The stone minaret stands in the northwestern part of the outer enclosure and connects to the mosque by a bridge with horseshoe-shaped arches. Its lower shaft is rectangular, above which a cylindrical section carries an external spiral staircase. An octagonal stage supports a lantern-like top shaped like an incense burner and capped by a ribbed dome. The spiral stair recalls minarets at Samarra. The minaret’s date and construction sequence remain disputed: proposals include a complete rebuilding by Lajin in 1296, survival of a mainly Tulunid structure with later repairs, and construction in stages, with the cylindrical section or upper level added later. The upper stage and some arches and bridge elements have been attributed to Mamluk-era work. Older descriptions and images show a copper finial shaped like a boat; a crescent had replaced it by 1892.
Water dispenser, school, and adjoining buildings
A sabil-maktab, combining a public drinking-water dispenser with a Qur’an school, stands in the southern part of the outer enclosure. Its construction has been attributed either to Lajin in 1296 or to Sultan Qaytbay between 1462 and 1482; it may have originated under Lajin and later been repaired by Qaytbay. Its western façade is about 19.80 metres long, with an entrance and a window for dispensing water. The rectangular room measures about 11.75 by 5.35 metres. Its timber-beam ceiling retains traces of painted floral decoration, and tiered ornamental forms occupy its corners.
A doorway beside the main prayer niche once connected the mosque to Ibn Tulun’s administrative palace, Dar al-Imara, on the southeastern side. It allowed him to enter or leave, change clothes, renew his ablution, or rest without passing through the worshippers. Two mansions from the 16th and 17th centuries, joined by a bridge, now occupy the palace site and house the Gayer-Anderson Museum. The Madrasa of Amir Sarghatmish, an Islamic school built around 1350, adjoins the enclosure on the northwest and meets the mosque’s western wall.


