Battle of Ayn Shams: The Fatimids under Jawhar defeat the Qarmatians at the gates of Cairo, putting an end to the First Qarmatian invasion of Egypt.
First Qarmatian invasion of Egypt
The First Qarmatian invasion of Egypt took place in 971, when the Qarmatians of Bahrayn unsuccessfully invaded Egypt, which had recently been conquered by the Fatimid Caliphate. Both the Qarmatians and the Fatimids were offshoots of the Isma'ili sect of Shi'a Islam, but belonged to different and rival branches. Following the takeover of Egypt under the general Jawhar in 969, the Fatimids began their expansion into the Levant. There they confronted the Qarmatians, who in previous years had raided and extracted tribute from the regional potentates. In order to stop the Fatimid advance, the Qarmatians, led by al-Hasan al-A'sam, joined in a league with other regional powers, including the Sunni Abbasid caliph in Baghdad. After defeating and killing the Fatimid commander Ja'far ibn Fallah at Damascus in August 971, the Qarmatians and their Bedouin allies marched south. A Fatimid relief army marching to assist Ibn Fallah withdrew to Jaffa where it was blockaded, while the main Qarmatian army invaded Egypt. The diversion of the Qarmatian forces into the Nile Delta in support of local revolts gave Jawhar the time to mobilize his remaining forces and prepare defences in the form of a trench and wall at Ayn Shams, just north of Cairo, then still under construction as the new Fatimid capital. At a battle north of the city on 22 and 24 December, Jawhar defeated the Qarmatians and forced them to withdraw from Egypt in disorder. After the Qarmatians quarreled with their Bedouin allies, the Fatimids were able to reoccupy Ramla, but this was short-lived; by the summer of 972, Palestine was again under Qarmatian control. On the other hand, the rebellions in Egypt were suppressed, and the Fatimid caliph al-Mu'izz was able to move his capital from Ifriqiya to Cairo in June 973. A second invasion followed in 974, which was also defeated, ending the Qarmatian threat for good, and paving the way for the Fatimid expansion into the Levant.
Fatimid Caliphate
The Fatimid Caliphate, also known as the Fatimid Empire, was a caliphate extant from the tenth to the twelfth centuries CE under the rule of the Fatimids, an Isma'ili Shi'a dynasty. Spanning a large area of North Africa and West Asia, it ranged from the western Mediterranean in the west to the Red Sea in the east. The Fatimids traced their ancestry to the Islamic prophet Muhammad's daughter Fatima and her husband Ali, the first Shi'a imam. The Fatimids were acknowledged as the rightful imams by different Isma'ili communities as well as by denominations in many other Muslim lands and adjacent regions. Originating during the Abbasid Caliphate, the Fatimids initially conquered Ifriqiya. They extended their rule across the Mediterranean coast and ultimately made Egypt the center of the caliphate. At its height, the caliphate included—in addition to Egypt—varying areas of the Maghreb, Sicily, the Levant, and the Hejaz.