During the initial
Islamic invasion in 639
AD,
Egypt was ruled at first by governors acting in the name of the
Righteous Caliphs, and then the
Ummayad Caliphs in
Damascus but, in 747, the Ummayads were overthrown and the power of the
Arabs slowly began to weaken. Although Egypt remained under the nominal rule of the
Abbasid Caliphate, its rulers were able to establish quasi-independent dynasties, such as those of the
Tulunids and the
Ikhshidids. In 969 the
Ismaili Shi'a Fatimid dynasty from
Tunisia conquered Egypt and established its capital at
Cairo. This dynasty lasted until 1174, when Egypt came under the rule of
Saladin, whose dynasty, the
Ayyubids, lasted until 1252. The Ayyubites were overthrown by their
Turkish bodyguards, known as the
Mamluks, who ruled under the suzerainty of Abbasid Caliphs until 1517, when Egypt became part of the
Ottoman Empire.
The Islamic Conquest of Egypt

The Age of the Caliphs
In 639 an army of some 4,000 men was sent against Egypt by the second caliph,
Umar, under the command of
Amr ibn al-As. This army was joined by another 5,000 men in 640 and defeated a
Byzantine army at the battle of
Heliopolis. Amr next proceeded in the direction of
Alexandria, which was surrendered to him by a treaty signed on November 8, 641.
Alexandria was regained for the Byzantine Empire in 645 but was retaken by Amr in 646. In 654 an invasion fleet sent by
Constans II was repulsed. From that time no serious effort was made by the Byzantines to regain possession of the country.
In return for a tribute of money and food for the troops of occupation, the Christian inhabitants of Egypt were excused military service and left free in the observance of their religion and the administration of their affairs.
Conversions of
Copts to
Islam were at first rare, and the old system of taxation was maintained for the greater part of the first Islamic century. The old division of the country into districts (
nomoi) was maintained, and to the inhabitants of these districts demands were directly addressed by the governor of Egypt, while the head of the community—ordinarily a Copt but in some cases a Muslim
Egyptian—was responsible for compliance with the demand.
The resentment of the Copts against taxation, however, led to a revolt in 725. In 727, to strengthen Arab representation, a colony of 3,000 Arabs was set up near
Bilbeis. Meanwhile, the employment of the
Arabic language had been steadily gaining ground, and in 706 it was made the official language of the government.
Egyptian Arabic, the modern language of Egypt, began to form. Other revolts of the Copts are recorded for the years 739 and 750, the last year of Umayyad domination. The outbreaks in all cases are attributed to increased taxation.
The
Abbasid period was marked by new taxations, and the Copts revolted again in the fourth year of Abbasid rule. At the beginning of the 9th century the practice of ruling Egypt through a governor was resumed under
Abdallah bin Tahir, who decided to reside at
Baghdad, sending a deputy to Egypt to govern for him. In 828 another Egyptian revolt broke out. And in 831 the Copts joined with native Muslims against the government.
In the 9th century Egypt was mostly governed by
Turks (
Tulunids,
Ikhshidids) ruling in the name of the Muslim governor. Egypt came into conflict with
Syria and the Caliphate until peace was made in 891. In 914 Egypt was invaded for the first time by a
Fatimid force sent by the Caliph
al-Mahdi Obaidallah, now established at
Kairawan. The Mahdi's son succeeded in taking Alexandria in 919, and Egypt wasn't freed from the invaders until the year 921, when reinforcements had been repeatedly sent from Baghdad to deal with them. In 969 the Fatimid general
Jawhar as-Siqilli was placed at the head of an army said to number 100,000 men and attempted to seize Egypt. He had little difficulty defeating the Egyptian army. And on July 6 969, he entered
Fostat at the head of his forces. Egypt was transferred from the Eastern to the Western caliphate.
The Fatimid Period

Near East in 1025 AD, showing Fatimid Caliphate and neighbors.
Jawhar as-Siqilli immediately began the building of a new city,
Cairo, to furnish quarters for the army which he had brought. A palace for the Caliph and a
mosque for the army were immediately constructed, which for many centuries remained the centre of Muslim learning. However, the
Carmathians of
Damascus under
Hasan al-Asam advanced through
Palestine to Egypt, and in the autumn of 971 Jauhar found himself besieged in his new city. By a timely sortie, preceded by the administration of bribes to various officers in the Carmathian host, Jauhar succeeded in inflicting a severe defeat on the besiegers, who were compelled to evacuate Egypt and part of Syria.
Meanwhile the caliph
al-Muizz had been summoned to enter the palace that had been prepared for him, and after leaving a viceroy to take charge of his western possessions he arrived in Alexandria on May 31 973, and proceeded to instruct his new subjects in the particular form of religion (
Shiism) which his family represented. As this was in origin identical with that professed by the Carmathians, he hoped to gain the submission of their leader by argument; but this plan was unsuccessful, and there was a fresh invasion from that quarter in the year after his arrival, and the caliph found himself besieged in his capital. The Carmathians were gradually forced to retreat from Egypt and then from Syria by some successful engagements, and by the judicious use of bribes, whereby dissension was sown among their leaders. Al-Muizz also found time to take some active measures against the Byzantines, with whom his generals fought in Syria with varying fortune. Before his death he was acknowledged as Caliph in
Mecca and
Medina, as well as Syria, Egypt and
North Africa as far as
Tangier.
Under the
vizier al-Aziz, there was a large amount of toleration conceded to the other sects of Islam, and to other communities, but the belief that the Christians of Egypt were in league with the
Byzantine emperor, and even burned a fleet which was being built for the Byzantine war, led to some persecution. Al-Aziz attempted without success to enter into friendly relations with the
Buwayhid ruler of Baghdad, and tried to gain possession of
Aleppo, as the key to
Iraq, but this was prevented by the intervention of the Byzantines. His North African possessions were maintained and extended, but the recognition of the Fatimid caliph in this region was little more than nominal.
His successor
al-Hakim bi-Amr Allah came to the throne at the age of eleven, being the son of Aziz by a Christian mother. Hs conduct of affairs was vigorous and successful, and he concluded a peace with the Byzantine emperor. He is perhaps best remembered by his destruction of the
Church of the Holy Sepulchre in
Jerusalem (1009), a measure which helped to provoke the
Crusades, but was only part of a general scheme for converting all Christians and
Jews in his dominions to his own opinions by force. A more reputable expedient with the same end in view was the construction of a great
library in Cairo, with ample provision for students; this was modelled on a similar institution at Baghdad. His system of persecution was not abandoned till in the last year of his reign (1020) he thought fit to claim divinity, a doctrine which is perpetuated by the
Druze, called after one Darazi, who preached the divinity of al-Hakim at the time. For unknown reasons al-Hakim disappeared in 1021.
In 1049 the
Zirid dynasty in the Maghrib returned to the
Sunni faith and became subjects of the Caliphate in Baghdad, but at the same time
Yemen recognized the Fatimid caliphate. Meanwhile Baghdad was taken by the Turks, falling to the
Seljuk Tughrul Beg in 1059. The Turks also plundered Cairo in 1068, but they were driven out by 1074. During this time, however, Syria was overrun by an invader in league with the
Seljuk Malik Shah, and Damascus was permanently lost to the Fatimids. This period is otherwise memorable for the rise of the
Hashshashin, or Assassins.
During the
Crusades, al-Mustafa maintained himself in Alexandria, and helped the Crusaders by rescuing Jerusalem from the
Ortokids, thereby facilitating its conquest by the Crusaders in 1099. He endeavoured to retrieve his error by himself advancing into Palestine, but he was defeated at the
battle of Ascalon, and compelled to retire to Egypt. Many of the Palestinian possessions of the Fatimids then successively fell into the hands of the Crusaders.
In 1118 Egypt was invaded by
Baldwin I of Jerusalem, who burned the gates and the mosques of Farama, and advanced to
Tinnis, when illness compelled him to retreat. In August 1121
al-Afdal Shahanshah was assassinated in a street of Cairo, it is said, with the connivance of the Caliph, who immediately began the plunder of his house, where fabulous treasures were said to be amassed. The vizier's offices were given to al-Mamn. His external policy was not more fortunate than that of his predecessor, as he lost
Tyre to the Crusaders, and a fleet equipped by him was defeated by the
Venetians.
In 1153
Ascalon was lost, the last place in Syria which the Fatimids held; its loss was attributed to dissensions between the parties of which the garrison consisted. In April 1154 the Caliph al-Zafir was murdered by his vizier Abbas, according to
Usamah, because the Caliph had suggested to his favorite, the vizier's son, to murder his father; and this was followed by a massacre of the brothers of Zafir, followed by the raising of his infant son
Abul-Qasim Isa to the throne.
In December of 1162, the vizier
Shawar took control of Cairo. However, after only nine months he was compelled to flee to Damascus, where he was favorably received by the prince
Nureddin, who sent with him to Cairo a force of
Kurds under Asad al-din
Shirkuh. At the same time Egypt was
invaded by the Franks, who raided and did much damage on the coast. Shawar recaptured Cairo but a dispute then arose with his Syrian allies for the possession of Egypt. Shawar, being unable to cope with the Syrians, demanded help of the Frankish
king of Jerusalem Amalric I, who hastened to his aid with a large force, which united with Shawar's and besieged Shirkuh in Bilbeis for three months; at the end of this time, owing to the successes of Nureddin in Syria, the Franks granted Shirkuh a free passage with his troops back to Syria, on condition of Egypt being evacuated (October 1164).
Two years later
Shirkuh, a Kurdish general known as "the Lion", persuaded Nureddin to put him at the head of another expedition to Egypt, which left Syria in January 1167; a Frankish army hastened to Shawar's aid. At the battle of Babain (April 11, 1167) the allies were defeated by the forces commanded by Shirkuh and his nephew
Saladin, who was made prefect of Alexandria, which surrendered to Shirkuh without a struggle. In 1168 Amalric invaded again, but Shirkuh's return caused the Crusaders to withdraw. Shirkuh was appointed vizier but died of indigestion (March 23, 1169), and the Caliph appointed Saladin as successor to Shirkuh; the new vizier professed to hold office as a deputy of Nureddin, whose name was mentioned in public worship after that of the Caliph. Nureddin loyally aided his deputy in dealing with Crusader invasions of Egypt, and he ordered Saladin to substitute the name of the Abbasid caliph for the Fatimid in public worship. The last Fatimid caliph died soon after in September, 1171.
Ayyubid Period

Ayyubid Empire in its Greatest Extent
Saladin was confirmed as Nureddin's deputy in Egypt, and on the death of Nureddin on April 12, 1174 he took the title
sultan. During his reign Damascus, rather than Cairo, was the major city of the empire. Nevertheless he fortified Cairo, which became the political centre of Egypt. It was in 1183 that Saladin's rule over Egypt and North Syria was consolidated. Much of Saladin's time was spent in Syria, where he fought the
Crusader States, and Egypt was largely governed by his deputy
Karaksh.
Saladin's son
Othman succeeded him in Egypt in 1193. He allied with his uncle (Saladin's brother)
Al-Adil I against Saladin's other sons, and after the wars that followed, Al-Adil took power in 1200. He died in 1218 during the siege of
Damietta in the
Fifth Crusade, and was succeeded by
al-Kamil, who lost Damietta to the Crusaders in 1219. However, he defeated their advance to Cairo by flooding the Nile, and they were forced to evacuate Egypt in 1221. Al-Kamil was later forced to give up various cities in Palestina and Syria to
Frederick II, Holy Roman Emperor during the
Sixth Crusade, in order to gain his help against Damascus.
Najm al-Din became sultan in 1240. His reign saw the recapture of Jerusalem in 1244, and the introduction of a larger force of
Mameluks into the army. Much of his time was spent in campaigns in Syria, where he allied with the
Khwarezmians against the Crusaders and Ayyubids. In 1249 he faced an invasion by
Louis IX of France (the
Seventh Crusade), and Damietta was lost again. Najm al-Din died soon after this, but his son
Turanshah defeated Louis and expelled the Crusaders from Egypt. Turanshah was soon overthrown by the Mameluks, who had become the "kingmakers" since their arrival and now wanted full power for themselves.
Mamluk Egypt
Bahri dynasty

Bahri Mamluks in its greatest extent. Blue indicates the Ilkhanates
The Mameluk sultans were drawn from the enfranchized slaves who formed the court and officered the arm. The sultans were unable to effectively form a new dynasty, usually leaving behind infants who were then overthrown. The first of these was
Aybak, who married
Shajar al-Durr (the widow of
al-Salih Ayyub) and quickly began a war with Syria. He was assassinated in 1257 and was succeeded by
Qutuz, who faced a growing danger from the
Mongols. Qutuz defeated the army of
Hulagu Khan at the
Battle of Ain Jalut in 1260, allowing him to regain all of Syria except Crusader strongholds. On the way back to Egypt after the battle, Qutuz died and was succeeded by another commander,
Baybars, who assumed the Sultanate and ruled from 1260 to 1277. In 1291
al-Ashraf Khalil captured Acre, the last of the crusader cities.
The Bahris greatly enhanced the power and prestige of Egypt, building
Cairo from a small town into one of the foremost cities in the world. Due to the sacking of
Baghdad by the Mongols, Cairo became the central city of the
Islamic world. The Mamluks built much of the earliest remaining architecture of Cairo, including many
mosques built out of stone using long, imposing lines.
Since 1347 the
Egyptian population, economy, and political system experienced significant destruction as a result of the
Black Death pandemic whose waves continued to destroy Egypt up to the early 16th century.
In 1377 a revolt in Syria spread to Egypt, and the government was taken over by the
Circassians Berekeh and
Barkuk. Barkuk was proclaimed sultan in 1382, ending the Bahri dynasty. He was expelled in 1389, but recaptured Cairo in 1390, setting up the Burji dynasty.
Burji dynasty
The Burji dynasty (1382-1517) proved especially turbulent, with political power-plays designating short-lived sultans. During the Burji dynasty, the Mamluks fought
Timur Lenk and conquered
Cyprus.
The
plague epidemics continued to destroy Egypt during this period; they attacked this country in 1388–1389, 1397–1398, 1403–1407, 1410–1411, 1415–1419, 1429–1430, 1438–1439, 1444–1449, 1455, 1459–1460, 1468–1469, 1476–1477, 1492, 1498, 1504–1505 and 1513–1514.
Constant bickering contributed to the inability to resist the
Ottomans.
The
Ottoman Sultan
Selim I defeated the Mamluks and captured Cairo on January 20, 1517, transferring the center of
power to
Istanbul. However, the Ottoman Empire retained the Mamluks as the Egyptian ruling class. The Mamluks and the Burji family regained much of their influence, but technically remained vassals of the Ottomans.