Mosque of Ibn Tulun

The Mosque of Ibn Tulun (مسجد إبن طولون) is located in Cairo, Egypt. It is one of the oldest mosques in Egypt as well as the whole of Africa surviving in its full original form, and is the largest mosque in Cairo in terms of land area. It is built around an open square courtyard which allows natural light to travel through. Ibn Tulun Mosque features ancient architecture styles of Egypt, its decorations being created from carved stucco and wood. This mosque is a popular tourist attraction.

Construction history
The mosque was commissioned by the Tulunid dynasty ruler Ahmad ibn Tulun, the Abbasid governor of Egypt from 868–884 whose rule was characterized by de facto independence. It was designed by the prominent Egyptian architect, Saiid Ibn Kateb Al-Farghany (سعيد بن كاتب الفرغاني), who was an Orthodox Christian, the same engineer who designed the Nilometer. The historian al-Maqrizi lists the mosque's construction start date as 876 AD, and the mosque's original inscription slab identifies the date of completion as.

The mosque was constructed on a small hill called Gebel Yashkur, "The Hill of Thanksgiving." One local legend says that it is here that Noah's Ark came to rest after the Deluge, rather than at Mount Ararat. The mosque has been used for several purposes. One such purpose is it was used as a shelter for pilgrims from North Africa to the Hijaz in the 12th century.

The grand congregational mosque was intended to be the focal point of Ibn Tulun's capital, al-Qata'i, which served as the center of administration for the Tulunid dynasty. Originally the mosque backed onto Ibn Tulun's palace, and a door next to the minbar allowed him direct entry to the mosque. Al-Qata'i was razed in the early 10th century AD, and the mosque is the only surviving structure.

The mosque was constructed in the Samarran style common with Abbasid constructions. It is constructed around a courtyard, with one covered hall on each of the four sides, the largest being on the side of the qibla, or direction of Mecca. The original mosque had a fountain (fauwara ) in the middle of the sahn, covered a gilt dome supported by ten marble columns, and round it were 16 marble columns and a marble pavement. Under the dome, there was a great basin of marble 4 cubits in diameter with a jet of marble in the centre. A distinctive sabil with a high drum dome was added in the central courtyard at the end of the thirteenth century by Mamluk Sultan Lajin instead of the "fauwara". (see also Chahartaq (architecture))

Interior
The interior arched windows provide natural light against the hollow dome. Each pointed arch has a window and is designed with plain geometric design.

Minaret
There is significant controversy over the date of construction of the minaret, which features a helical outer staircase. It is also told that using these stairs one can climb up on a horse. Legend has it that Ibn Tulun himself was accidentally responsible for the design of the structure: supposedly while sitting with his officials, he absentmindedly wound a piece of parchment around his finger. When someone asked him what he was doing, he responded, embarrassed, that he was designing his minaret. Many of the architectural features, however, point to a later construction, in particular, the way in which the minaret does not connect well with the main mosque structure, something that would have been averted had the minaret and mosque been built at the same time. Architectural historian Doris Behrens-Abouseif asserts that Sultan Lajin, who restored the mosque in 1296, was responsible for the construction of the current minaret.

The minaret shows influences from both the Lighthouse of Alexandria and the famous minaret in Samarra.

It is built entirely of well-fired red brick, plaster, and carved stucco. Stucco is cement-based plaster that is mixed on-site and applied wet which hardens to a very dense solid. The mosque is also built from this material. The staircase extends up to the tower 170 feet in height.

Prayer niches
There are six prayer niches (mihrab) at the mosque, five of which are flat as opposed to the main concave niche. It indicates the qibla which the profession of faith inscripted in Kufic calligraphy.


 * The main niche is situated in the centre of the qibla wall and is the tallest of the six. It was redecorated under Sultan Lajin and contains a top of painted wood, the shahada in a band of glass mosaics and a bottom of marble panels.
 * The same qibla wall features a smaller niche to the left of the main niche. Its stalactite work and naskhi calligraphy indicate an early Mamluk origin.
 * The two prayer niches on the piers flanking the dikka are decorated in the Samrarran style, with one niche containing a unique medallion with a star hanging from a chain. The Kufic shahada inscriptions on both niches do not mention Ali and were thus made before the Shi'a Fatimids came to power.
 * The westernmost prayer niche, the mihrab of al-Afdal Shahanshah, is a replica of an original kept at Cairo's Museum of Islamic Art. It is ornately decorated in a style with influences from Persia. The Kufic inscription mentions the Fatimid caliph al-Mustansir, on whose orders the niche was made, as well as the Shi'a shahada including Ali as God's wali after declaring the oneness of God and the prophethood of Muhammad.
 * On the pier to the left are the remains of a copy of al-Afdal's mihrab. It differs, however, by referring to Sultan Lajin instead of al-Mustansir, and a lack of Ali's name.

Outside the mosque
During the medieval period, several houses were built up against the outside walls of the mosque. Most were demolished in 1928 by the Committee for the Conservation of Arab Monuments, however, two of the oldest and best-preserved homes were left intact. The "house of the Cretan woman" (Bayt al-Kritliyya) and the Beit Amna bint Salim, were originally two separate structures, but a bridge at the third floor level was added at some point, combining them into a single structure. The house, accessible through the outer walls of the mosque, is open to the public as the Gayer-Anderson Museum, named after the British Army officer R.G. 'John' Gayer-Anderson, who lived there until 1942. The ziyada or empty space between the walls is approximately 26,318 sq m. Outside the mosque you can see several houses were built up against the outside walls of the mosque. The topography of the mosque is surrounded by a very busy city.

Restoration
The mosque has been restored several times. The first known restoration was in 1077 under orders of the Fatimid vizier Badr al-Jamali. Sultan Lajin's restoration of 1296 added several improvements. The mosque was most recently restored by the Egyptian Supreme Council of Antiquities in 2004.

In popular culture
Parts of the James Bond film The Spy Who Loved Me were filmed at the mosque. The mosque is featured in the game Serious Sam 3: BFE, forming a significant part of the game's third level. It is also featured in a level of Tomb Raider: The Last Revelation, where Lara Croft has to trap a minotaur inside the mosque.

The mosque is mentioned in the Nero Wolfe story And Be a Villain by Rex Stout, wherein Nero Wolfe discusses the pointed arches with a guest.