There are few places within the bustling metropolis of modern Cairo that might be described as serene, but, of those that are, the most deserving of the description is the Great Mosque built by Ahmad ibn Tūlūn (ibn Tulun; AD 835-884) as part of his short-lived city al-Qata’i‘, once capital of an independent Egyptian state. By historical account, al-Qata’i‘ (‘The Quarters’, reflecting the division of the city among groups of ibn Tulun’s followers and army contingents) contained some of the finest buildings to have been constructed in Egypt for centuries. Most were quickly destroyed, but the exquisitely decorated Great Mosque survives, and it stands as a manifestation of ibn Tulun’s architectural vision.

Al-Qata’i‘ was not the first new capital to be built in the area. When Arab forces arrived in Egypt in 641, they rejected Alexandria as their capital and established a new centre that more easily allowed for land communication with their homelands. They first chose a site to the east of the Roman fortress of Babylon (the area known today as ‘Old Cairo’) that sat near the beginning of the Nile Delta and protected an ancient canal and overland route to the Red Sea. Fustāt, as this site was called, remained the capital of Egypt for most of the period up to 1168, when the administration of Egypt moved to Cairo (al-Qāhirah). However, when descendants of al-‘Abbās ibn ‘Abd al-Muttalib (an uncle of the Prophet Muhammad) established the Abbasid Caliphate in 750, they shifted the capital slightly to the north of Fustāt to a new site, al-‘Askar.
By the reign of Caliph al-Ma’mun (r. 813-833), the directly ruled or client-state boundaries of the Abbasid Empire were immense. It was one of the largest empires to have arisen since the time of Alexander the Great in the 4th century BC and stretched from the Indus Valley in the east to the Atlantic in the west. Recognising the difficulty of ruling the empire from Baghdad, and in order to consolidate his power over it, al-Ma’mun implemented an extensive system of appanage (grants of land and position) throughout his domains.
Tensions arose somewhat closer to home during the reign of his successor al-Mu’tasim (r. 833-842) and, following incidents between Turkish soldiers and the citizens of Baghdad, the caliph created a new capital in 836 at Samarra – 129 kilometres north of the city. Samarra was to remain the capital only until 892, but became the site of a number of lavish palaces and the Great Mosque – with its magnificent spiral minaret – built by Caliph al-Mutawakkil (r. 847-861) and completed in 851.

It was amid the splendour and power associated with Samarra that our protagonist Ahmad ibn Tulun – a child of Turkic descent – grew up. In his twenties, his reputation for trustworthiness and efficiency, together with his standing among the Turks, brought him increasingly to the caliphs’ attention. In 868, Caliph al-Mut‘az (r. 866-869) offered the governorship of Egypt to a Turkish official in Samarra named Bakbak – who had no intention of leaving the pleasures of the capital behind – and he in turn offered the post to his stepson, the 33-year-old Ahmad.
At the head of an army, ibn Tulun entered Egypt on Wednesday 27 August 868. The swift, but careful, removal of two officials loyal to the caliph quickly ensured his control of the finances and political destiny of Egypt, and his ambition to create an independent state soon became evident. This process was facilitated when Caliph al-Mu‘tamid (r. 870-892) split control of the empire between his brother al-Muwaffaq and his son al-Muffawid, allowing ibn Tulun to play one side off against the other. A punitive expedition by al-Muwaffaq – to whom ibn Tulun in principle owed allegiance – was swiftly repulsed.

Nonetheless, when problems arose in Bilād al-Shām (Greater Syria and Palestine), it was to ibn Tulun that the caliph turned, adding to the governor’s already formidable army in Egypt and to the territory under his control by including Bilād al-Shām and further buffer territories to the north that bordered the Byzantine Empire.
Although still nominally under the caliph, ibn Tulun had created the first independent Egyptian state since the Pharaonic period, and he ruled it from the new capital al-Qata’i‘, which he had founded in 870.

The new city stretched westward for about two kilometres from the area below the hill on which Salāh ad-Dīn (Saladin; r. 1174-1193) was to build his citadel that, together with the mosque of Muhammad ‘Alī (r. 1805-1848), dominates the Cairo skyline today. From north to south, the occupied area extended about one and a half kilometres between two lakes.
Ibn Tulun’s residential palace of al-Maydan (begun in 869) nestled below where the Citadel now stands. The complex included substantial gardens and a large open parade ground (maydān) used for military purposes and polo matches. After ibn Tulun’s death in 884, his son and successor Khumarawiya (r. 884-896) reputedly decorated the walls of the palace with sheets of gold held with lapis lazuli studs. He converted the open parade ground into a garden in which the trunks of exotic trees were covered in gilded copper and fed individually through water pipes.
Al-Maydan had many gates, each with their own specific purposes and times of operation. To the west of the maydān, however, was a monumental three-arched gateway – through the central section of which only the amir might pass – that deeply impressed those who saw it. It was reportedly decorated with stucco lions and named Bab al-Siba‘ (the Gate of the Lion).

From a pavilion on top of the gate or from the Qubbat al-Hawa (Dome of the Winds), probably located where the Citadel now stands, ibn Tulun could sit and view the whole city. To the south, he could see the new aqueduct which ran for several kilometres from a freshwater well and supplied all the inhabitants of the city throughout the day and night. The 10th-century Egyptian historian al-Balawī tells us that the huge cost of this major structure was offset by treasure that the amir had found at Tannur Fir‘awn (Lantern of the Pharaoh) in the Muqattam Hills to the east of al-Qata’i‘. Al-Balawī also tells us that the engineer who built the aqueduct, al-Nasrani, was a non-Muslim or a Christian, and that he also was responsible for the construction of the Great Mosque of ibn Tulun, to which we shall return.
In the distance, towards the Nile and in line of sight toward the pyramids at Giza across the river, the amir could see the hospital to which he would ride out every Friday to discuss matters with the doctors and meet with patients, who were given free medicine and food during their stay.
Ibn Tulun’s gaze might also follow the bending line of the east–west artery of the city – Shari‘ al-A‘zam (Greatest Street) – that connected the palace with the amir’s central administrative building and the Great Mosque just beyond. The different quarters of the city branched off to the left and right, marked at the corner where alleys ran off, and the amir would travel in a ceremonial procession along the street to pray at the mosque, surrounded by troops and citizens.

The central administrative hub of the Tulunid empire, the Dar al-Imara, lay along the south-east wall of the Great Mosque, and it was here also that the amir would prepare for Friday prayers before passing through his own door into the mosque.
Yet now, before accompanying the amir into the Great Mosque itself, we must pause for a moment.
Ibn Tulun was succeeded by his son Khumarawiya and by two young grandsons, of diminishing competence, amid increasing strife and internal rivalries within the newly formed Tulunid Empire. Simultaneously, the Abbasid Empire was undergoing a final phase of resurgence under the Caliph al-Muktafī bi-llāh (r. 902-908), which led to the final defeat of ibn Tulun’s dynasty. In 905, the city of al-Qata’i‘ was razed to the ground by commander Muhammad Sulayman al-Katib, and the administrative capital of Egypt returned to Fustāt.
The great aqueduct survived and continued to supply water for some time to the local population, at least those living in Fustāt and al-‘Askar, and the Dar al-Imara buildings beside the Great Mosque were in use until Saladin moved his administration to the Citadel in the 12th century. The mosque remained untouched, though time was to batter parts of it considerably.

Later historians tell us that ibn Tulun had desired a mosque that would withstand fire, earthquakes, and the flooding of the Nile, so he appointed the architect al-Nasrani to build on the limestone bedrock of Gabal Yashkur (Hill of Yashkur), just to the north of the cities of al-‘Askar and Fustāt. Although this was an open space, it was traditionally an area where people prayed, and there was a small tomb here which some of those later historians associated with the Prophet Harun (Aaron), the brother of Moses. Gabal Yashkur was duly levelled and the Great Mosque was constructed between 876 and 878. It is the oldest mosque to have survived in its original form in Africa. The true ‘oldest mosque in Africa’, that of commander ‘Amr Ibn al-‘As in Fustāt, was constructed in 641–642 when the Arabs first arrived, but it has been completely rebuilt several times. Entering ibn Tulun’s mosque from the teeming streets outside is an extraordinary experience. The high double walls with their wonderfully ornate crenellations immediately insulate the visitor from the noise outside: we are in an undoubtedly tranquil place. High up on the outside of the mosque wall, between the windows allowing light to enter the arcades, fluted niches of a type associated with Coptic Christian buildings lend credence to the possibility that the architect of the mosque was a non-Muslim or, at least, thoroughly steeped in older Egyptian traditions.
The additional space (ziyada) around the mosque created by the two sets of walls extends around three sides (excluding the side in the direction of Mecca). The outer wall, with its many doors echoed in the inner wall, protected the mosque, of course, but the design also created an area in which worshippers could meet and prepare themselves for prayer. Only the door in the south-east corner is open today and, once through that entrance, we see that the mosque is of a typical form, with a large open court (sahn) surrounded by arcades (riwaqs) on all four sides. On three sides there are two arcades, but on the side facing Mecca (the qibla wall) there are five arcades.
The sense of harmony and elegance experienced on all sides of the court is not accidental. When the amir was asked to add a place for ablutions before prayers (mayda’a), he built a structure between the walls and beside the minaret, which also stood outside the mosque proper, to avoid too many structures appearing inside the mosque.
Although the arcades of mosques in Egypt tended to reuse ancient Egyptian or Graeco-Roman freestanding columns, ibn Tulun appears to have insisted on the use of rectangular firebrick piers of a type that were familiar to him from the Great Mosque of Caliph al-Mutawakkil in Samarra, where he had spent his youth. The solidity of the piers – apart from a window high up that allowed light and air to enter the arcade – is counterbalanced by the extraordinary elegance of the pointed arches that stretch out in between. These gently return at the base in a manner that was never repeated in the Islamic architecture of Egypt. As if to reinforce the origin of their design, many of the arches still retain stucco decoration in the Samarran style. Inside the arcades, 128 windows in the form of stucco grilles in different geometric and floral designs illuminate the interior and shine extraordinary patterns of light on the walls and floors throughout the day.
On the south-east wall, there are five rows of arches and the windows are set along the diagonal between them in such a manner as to focus attention in the direction of Mecca. In the reverse direction from all of the arcades, the eye is drawn to the fountain pavilion in the middle of the court. The fine central fountain pavilion (fisqiya) that can be seen today was built by the Mamluk sultan Husam al-Din Lajin (r. 1296-1299), who adopted and restored the mosque in 1296 (he is said to have hidden in the mosque for over a year in more troubled times). The original Tulunid fountain structure (fawwara), which burned down around 995, was an open octagonal building that utilised fine columns that probably came from a ruined church. These surrounded a marble basin and the fountain itself. They also supported a flat wooden structure and a gilded dome with large arched windows in the area, which transitioned between the octagonal and circular surfaces. On the flat walls between the arches hung sundials that allowed the calculation of the timing of prayers throughout the day.

Sultan Lajin was responsible, too, for the fine prayer niche (mihrab) at the centre of the qibla wall. The main body of the mihrab is composed of a glass mosaic containing words bearing witness that there is one God and Muhammad is His Prophet (the shahada). The lower part is made of marble in a refined Mamluk style. The centre is set off by two sets of marble pillars with Coptic Christian capitals – presumably from the same source as had been used in the Tulunid fountain pavilion in the court. Beside the mihrab, Lajin also added a very large pulpit (minbar) from which the sermon would be delivered on Fridays. The sides of the minbar are of teak, with sumptuous panels inlaid with ebony. The sultan probably added the graceful crown of the minaret, too, which can still be entered by the adventurous visitor.
The minaret is, of course, the most immediately recognisable feature of the mosque – square at the bottom, circular in the middle with a spiral staircase running around the outside, and delicate in form at the top. The original Tulunid minaret was built along the line that ran from the mihrab, through the fountain pavilion, and beyond through the arcade on the north-west side. It was a wholly spiral structure reminiscent of the minaret of the Great Mosque of Caliph al-Mutawakkil in Samarra. In this case, the stone-built minaret was quite short, with a spiral staircase running around it that was said to be wide enough for two loaded camels to climb side by side to the top. The whole structure appears to have been capped with a boat-shaped finial that may have been an ancient Egyptian artefact from the treasure which is said to have paid for the building of the mosque. It is not known when the original free-standing minaret collapsed, but the square base of the current minaret, and possibly the circular shaft with its spiral echo of its predecessor, were built around the time that Saladin ruled Egypt.

While the architectural components of the Great Mosque of ibn Tulun remain individually fascinating, it is, nonetheless, the peace and harmony of the whole building that still impresses today. These give us the briefest glimpse of the glories of the lost city of al-Qata’i‘ and the vision of its creator who had been so clearly influenced by his upbringing far away from Egypt.
ALL images: © Nigel Fletcher-Jones