The 15th-century Isma'ili (and thus pro-Fatimid) historian,
Idris Imad al-Din, provides the most detail about the expedition against Egypt, and is complemented by Sunni sources such as
al-Tabari and
al-Kindi, who write from the opposite side.
Conquest of the Cyrenaica The expedition against Egypt was launched on 24 January 914, when the army under Habasa ibn Yusuf departed Tripoli. The Fatimid army took the coastal route. The Abbasid garrisons of
Sirte and
Ajdabiya abandoned these towns without battle, and on 6 February Habasa entered
Barqa, the capital of Cyrenaica and the "gateway of Egypt". The conquest of Cyrenaica promised to be beneficial to the Fatimid treasury: the land tax () had brought in 24,000
gold dinars to the Abbasids annually, with another 15,000 dinars provided by the paid by the Christian , as well as the , and the taxes. According to Imad al-Din, Barqa was evacuated without battle. Sunni sources claim that the Fatimid troops committed atrocities against the inhabitants and extorted funds from the local merchants. Thus Habasa forced the local pigeon merchants to roast and eat their ware, suspecting them of using their birds to spy for the Abbasids. He urged the members of the local Arab militia (the ) to enroll in the Fatimid army, while imposing considerable financial levies on the town's population. He furthermore executed two chieftains of the Mazata, who nine years before had waylaid and robbed al-Mahdi during his journey to Ifriqiya; their sons were also killed, while their womenfolk were sold into slavery and their possessions confiscated. News of the Fatimids' arrival in Barqa provoked the Abbasid authorities in Egypt to send an army against them. Habasa's men, reinforced by fresh troops from Ifriqiya, won the ensuing battle outside the city on 14 March.
Capture of Alexandria of
al-Qa'im bi-Amr Allah, Fatimid caliph in 934–946. As heir-apparent to his father, he led the two early Fatimid invasions of
Egypt Encouraged by this success, al-Mahdi sent his son and heir, al-Qa'im, with another army east to assume command of the expedition. At the head of a force comprising numerous Kutama as well as members of the Arab of Ifriqiya, al-Qa'im set out from al-Mahdi's residence at
Raqqada on 11 July. He arrived at Tripoli on 1 August, writing to Habasa to await his coming before invading Egypt proper. Disregarding these orders, however, the ambitious Habasa led his forces into Egypt; after defeating an Abbasid force at al-Hanniya (near modern
El Alamein), on 27 August 914 he entered
Alexandria. The Kutama raided south along the
River Nile and devastated the country, reaching as far as
Giza, across the river from the capital of Egypt,
Fustat. Habasa wrote to the local governor,
Takin al-Khazari, offering safe-conduct () in exchange for his surrender, but Takin refused. Al-Qa'im arrived in Alexandria on 6 November 914, where he imposed the Fatimid
call to prayer, a Kutama governor, and an Isma'ili (judge). In the meantime, the arrival of the Fatimid army in Alexandria provoked panic in
Baghdad. The Abbasid government had paid little attention to the affairs of Ifriqiya and the claims of al-Mahdi, but now urgent enquiries were made as to his origin and intentions. Takin urgently requested reinforcements, and the
Syrian provinces were mobilized. In September 914, the first Syrian troops began arriving in Fustat. In October, the Abbasid caliph
al-Muqtadir appointed his chamberlain
Mu'nis as commander-in-chief and ordered him to Egypt. To support the expedition, and alleviate the financial burden on the Egyptian populace of the expeditionary force, two million silver were allocated by the treasury.
March on Fustat and first battle at Giza In early December, as the
Nile floods withdrew and allowed the passage of armies along the river, the Fatimid army set out for Fustat in two columns: Habasa ahead, with al-Qa'im following behind. As Fustat lay on the eastern bank of the Nile, and the only way to cross to it was by the
pontoon bridge to
Rawda Island and Giza, Takin al-Khazari mobilized the garrison and the inhabitants of the city and set up a fortified camp at Giza. On 13 December, the first alarm was raised in Fustat, with anyone able to bear arms rushing over the bridge, but no attack ensued. This was repeated the next day, and only on the day after did the Fatimids attack. In the ensuing battle, the Abbasid forces prevailed, as Takin's
Turkish horse-archers inflicted heavy casualties on the Kutama
lancers. The Egyptian forces pursued the Kutama into the night, but during the pursuit the inexperienced levies fell into an ambush, saving the Fatimid army from a complete rout. The Egyptians remained tense, with another false alarm the next day, but only minor skirmishes occurred during the next few days. Despite this setback, some of the Egyptians (Christian
Copts and Muslims alike) corresponded with al-Qa'im, revealing the continued presence of an element of possible sympathizers and, according to
Heinz Halm, possibly the presence of a Fatimid in Fustat.
Fatimid occupation of Fayyum and defeat at Giza Unable to cross the river to Fustat, al-Qa'im moved, with a large part of his army, around Takin's defences and into the fertile
Fayyum Oasis, where they could find provisions. The Kutama initially plundered the area, but al-Qa'im restored order and imposed a regular tax regime on the inhabitants. At this point, al-Qa'im and Habasa, who had remained behind in command of the bulk of the Fatimid army at Giza, fell out when al-Qa'im ordered Habasa replaced. On 8 January 915, in a large-scale battle at Giza, the Fatimids were decisively defeated; Fatimid sources unanimously attribute this defeat to Habasa, who fled the battlefield, despite al-Qa'im's exhortations to stand firm. The pro-Fatimid accounts maintain that al-Qa'im launched three attacks on the enemy and caused many casualties, but these embellishments cannot hide the fact that the battle was a disaster: with his army collapsing, al-Qa'im retreated to Alexandria, which he entered on 23 January.
Fatimid withdrawal from Alexandria and revolt in Cyrenaica Despite the setback, in his letters to his father, and the surviving sermons that he delivered in Alexandria, al-Qa'im appears not to have lost confidence in his ultimate success. At Alexandria, he held a number of
Friday prayer sermons (), propagating the Isma'ili and Fatimid cause. For a while he also engaged in negotiations with some Egyptian defectors, who asked for from al-Qa'im, and raised the prospect of the capitulation of Fustat. It appears that al-Qa'im himself was not entirely convinced of the sincerity of such proposals, which became impossible when the Abbasid commander-in-chief Mu'nis arrived at Fustat in April 915. Mu'nis dismissed Takin and replaced him with
Dhuka al-Rumi. Soon after, Habasa with thirty of his closest followers deserted al-Qa'im and made for Ifriqiya; alarmed by this, al-Qa'im evacuated Alexandria hastily and without battle, leaving much of his armament and equipment behind. Dhuka occupied the city and installed a strong garrison under his son al-Muzzafar, before returning to Fustat to mete out punishment to those elements suspected of corresponding with al-Qa'im. Al-Qa'im arrived at Raqqada on 28 May 915. In his rear, Cyrenaica rose in revolt and overthrew Fatimid control; in Barqa, the entire Kutama garrison was killed. The rebellion was only suppressed in 917, after an 18-month siege of Barqa. ==Analysis==