Before Cairo became the capital of Egypt, and before Fustat was known as the first Islamic capital of the country, Alexandria stood on the Mediterranean as one of the greatest cities of the Islamic world.

When Muslims arrived there in the first century AH/seventh century CE, they did not enter an ordinary city. They faced a political, economic, maritime and intellectual centre with a long history, and a port that opened Egypt onto the Mediterranean and the Byzantine world.

From a Mediterranean City to an Islamic Port

After the conquest of Egypt, Amr ibn al-As headed towards Alexandria, and Byzantine resistance ended with Muslim control of the city in 21 AH/642 CE approximately. The fall of Alexandria was not the end of the conflict.

In around 25 AH/645 CE a Byzantine force returned to the city and seized it, before Amr ibn al-As recaptured it in 26 AH/646 CE. From that time Islamic rule was firmly established there, although its maritime nature kept it constantly exposed to dangers arriving from the sea.

This point is essential to understanding its history: Alexandria was not an inland city that merely received events, but a city on the front line with the Byzantine and Mediterranean world.

Qaitbay Citadel in Alexandria

Why Did Alexandria Not Become the Capital of Egypt?

The question may seem logical: if Alexandria was richer and more famous than Fustat, why did Amr ibn al-As not make it the capital of Egypt? The answer reveals the difference between a commercial city and a military capital.

Nevertheless, the city retained considerable political and administrative weight. In the Umayyad period the state paid attention to its fleet and its port, and local sources indicate that Alexandria became an important naval base, and some governors took it as a centre for administering the north.

Thus a functional division of great importance emerged in Islamic Egypt: Fustat was the heart of administration and the internal economy, while Alexandria was Egypt's eye on the Mediterranean.

Alexandria

Alexandria and the Port That Guards Egypt

The sea was the source of Alexandria's wealth, but it was also the source of danger. The city faced repeated Byzantine attempts to retake it, and monitoring the sea, building ships and defending the coast became part of its Islamic function.

Over time, Alexandria developed from a city inherited from the Byzantine era into an Islamic port with its garrison, markets, mosques and institutions.

The sources note that at the beginning of the Islamic era the city retained its ancient urban structure, including its quarters, walls, water cisterns and port, and then Islamic architecture gradually left its mark on it. The sources describe the city at the time of the conquest as divided into districts separated by walls, containing an advanced network of cisterns, passageways and markets.

Here Islam did not erase the ancient city, but reintegrated it into a new civilisational network.

Photo from the Museum of Islamic Art in Alexandria

Wealth Came from the Sea, and Knowledge Came from It Too

Trade in Alexandria was not separate from knowledge. The city's location made it a point of contact between Egypt, the Maghrib, the Levant and the Mediterranean, and in Islamic times it became part of a wider trading movement linking the East and the West.

In the Fatimid period in particular, Alexandria acquired a distinctive cultural function: the arrival of scholars from different regions made it a meeting point for schools of learning in the East and the West.

This is one of the most telling facts in the city's history: Alexandria was capable of producing a vibrant scholarly life even under the differing political and sectarian environments that governed it.

Al-Silafi: The Scholar of Alexandria and Its Living Library

Among the scholars of Alexandria, Abu Tahir al-Silafi stands out, becoming one of the leading figures in hadith and transmission in the sixth century AH/twelfth century CE.

Al-Silafi's importance lay not only in his learning but in the network of students and transmitters associated with him. Because of him, Alexandria became a station visited by students of hadith from across the Islamic world.

Thus the city moved from being a centre for goods arriving by sea to a centre through which chains of transmission, books and scholarly narrations also passed.

Alongside al-Silafi, Alexandria was associated with Abu Bakr al-Tartushi, author of the book Siraj al-Muluk (The Lamp of Kings), who came to it from al-Andalus and settled there until his death in 520 AH/1126 CE.

From the Fatimids to the Ayyubids: Change of Power and the City's Endurance

When Fatimid rule ended in 567 AH/1171 CE, Egypt came under Ayyubid rule, and Cairo became the centre of Sunni political and scholarly weight.

Yet Alexandria did not lose its standing. Its maritime position remained important in the struggle with the Crusader powers, and it became part of the defensive system protecting Egypt and the coast.

Under the Mamluk state this role grew, especially after the fall of the major Crusader strongholds in the Levant in the seventh century AH/thirteenth century CE; Egypt, and Alexandria in particular, became a strategic target for hostile naval powers.

Here another historical paradox appeared: the stronger Egypt became, the greater the value of Alexandria as a target to strike.

767 AH/1365 CE: When the Danger Reached the Heart of the Port

In 767 AH/1365 CE Alexandria suffered one of the most violent events in its Islamic history. A campaign led by the King of Cyprus, Peter I, attacked the city; his forces landed, broke through its defences and plundered it for several days, before withdrawing with large numbers of captives and spoils.

Islamic sources record that the attack was a catastrophe for the city's inhabitants, that parts of it were burned, and that its economic and social conditions were disrupted after the incident.

The attack was not merely a military raid; targeting Alexandria meant targeting Egypt's commercial and maritime lifeline.

That is why the rebuilding of the city and the repair of its defences formed part of the Mamluk state's response to the naval threat.

What Remains of Islamic Alexandria?

Modern Alexandria may appear entirely different from the city of the early Islamic centuries. The port has changed, much of the old urban fabric has disappeared, and the layers of the modern city overlie the traces of earlier periods.

Yet the memory of the Islamic city remains present in the Citadel of Qaitbay, the mosques and endowments, the port, the old roads, and in the city's layers, which preserve the story of its transition from a Byzantine world to an Islamic one.

As for the ancient Lighthouse of Alexandria, it has disappeared, but its site was later associated with the Citadel of Qaitbay, built in the ninth century AH/fifteenth century CE on the area of the old Pharos, so that the place itself bears witness to the transfer of the port's function from one era to another.

Alexandria Lighthouse

This was the eleventh episode of the series Civilisations of Islam Throughout History, an episode on Alexandria, Egypt's great port on the Mediterranean, gateway for trade between the Islamic world and the West, Egypt's naval bastion, and a meeting place for the scholars of the East and the West, a city that continued to play a strategic role in defence, trade and learning from the Islamic conquest through the Mamluk era.