Egypt was under the rule of the Ikhshids from 323/935 to 358/969 before the advent of the Fatimids. It was a Turkish dynasty under the Abbasid suzerainty. Muhammad Ikhshid, the founder of the rule, died in 355/966 and his two minor sons, Abu Kassim and Ali ruled after him in succession as the nominal rulers, and the virtual authority was held by an Abyssinian, called Abul Misk Kafur (camphor, the father of musk). He was an able governor, and died in 357/968 after ruling for 22 years. Kafur's death left Egypt in a state of confusion. It was a time of acute disorders and anarchy. Famine broke out as a result of scarcity of water in Nile and it was also followed by plague. The soldiers had their pay diminished, their gratuities were in arrear. The whole administration failed to relieve the people from distress due to lack of capable governor.
Kafur was succeeded by a twelve years old Abul Fawaris Ahmad. Under his rule, there had started an animosity between the vizir Abu Jafar bin Furat and Yaqub bin Killis, the treasurer. Yaqub was imprisoned, but was relieved soon by the intervention of Sharif Muslim al- Hussain, a great grandson of Imam Hussain. Yaqub bin Killis had gone to al-Muizz in Maghrib and informed the chaotic condition of Egypt. He also requested the Imam to take possession of Egypt. On the other hand, the Abbasids also neglected Egypt because of their internal wars. The people of Egypt ultimately knocked the door of Maghrib and wrote several letters to al-Muizz, inviting him to get rid of calamities. Al-Muizz confessed the offer and ordered for the preparation of large army to conquer Egypt. According to Ibn Khallikan (5th vol., p. 226), "The preparations for expedition against Egypt are a fair witness to the efficiency of the Fatimid logistics." Four months provisions were patiently amassed at the Qasr al-Ma, near Mansuria. Wells were dug and rest-houses built along the route between Tunisia and Egypt in 354/966, about three years before the invasion.
Al-Muizz determined to entrust the invasion of Egypt to his general, Jawhar, who had already proved his efficiency in the reduction of the western provinces, but just about this time, Jawhar fell ill, that no hopes were entertained of his recovery. In this state, he was visited by al-Muizz, who according to Ibn Khallikan (1st vol., p. 341) declared that Jawhar would not only escape from death, but make the conquest of Egypt. The health of Jawhar was restored soon. Al-Muizz attended with his court to bid him farewell and according to Makrizi (1st vol., p. 378), he said: "We are in need of your bodies and minds. Be it known to you that if you act on what we say, we can hope that God will ease our attack of the eastern countries, as he did of the western parts with your cooperation." He further said, "By God, if Jawhar goes alone to conquer Egypt, he will be able to take hold of it. You people will enter Egypt within remaining in your veils without offense, and will land at the ruins of the Tulunids, where a city shall be built, whose name shall be al-Qahira, which shall dominate the world." (Ibid.)
Thus, al-Muizz made his farewell speech to Jawhar's troops on the eve of their departure from the Maghrib in which he greatly emphasised the political and religious policy to be followed in the new dominion. He admonished his troops that "justice was the basis of the state, not oppression." If this principal were to be observed by all, he thought, the Katama warriors would eventually conquer the East as easily as they had conquered the West.
With the conclusion of his khutba, al-Muizz formally ordered Jawhar to set out, and ordered his princes to dismount and give Jawhar the salutation of departure; and this also obliged the great officers of the empire to dismount. Jawhar kissed the hand of al-Muizz, and mounted his horse and put his army on march.
Jawhar's march started from Kairwan with a huge army on 14th Rabi I, 357/February 4, 969. Ibn at-Tiqtaqa in his "al-Fakhri" (comp. 701/1302) quotes the poet, named Muhammad bin Hani Maghribi (d. 362/973) as follows: "No army before the army of Jawhar trotted and walked its charges by files of tens". Jawhar's army consisted of Arabs, Saqaliba, Rum and Berber tribes of whom the Katama was the largest. Ibn Khallikan (5th vol., p. 377) estimated at more than a hundred thousand men, and Nuwayri (d. 732/1332) writes in "Nihayat al-Arab" (ed. M. Jabir A. al-Hini, Cairo, 1984, p. 44) that it was later augmented by two hundred thousand men. The cost of the expedition is also given for 24 million dinars. More than a thousand camel loads of gold were also placed under Jawhar in order to meet extra expenses. With all his forces, Jawhar reached Barqa, whose governor, Aflah received him with honour. Jawhar directed his forces towards Alexandria, and conquered it without much opposition. When the people of Fustat learned the fall of Alexandria, they sent their deputation, who met Jawhar in a village, called Taruja on Rajab, 358/June, 969. Jawhar promised them for safe-conduct in writing. On 11th Shaban, 358/June 30, 969, the Fatimid general Jawhar overwhelmed the last feeble resistance of the Ikhshid forces near Jiza, and entered Fustat by crossing the Nile. He landed at the ruins of the Tulunid dynasty (254-292/868-905) on 15th Shaban, 358/July 4, 969 where he was received with honour.
In the same year, Jawhar dispatched a messenger towards Maghrib in presence of al-Muizz with the glad tidings that Egypt had fallen to the Fatimids. Ibn Hani, ready on the spot, recited a qasida which began:-
The Abbasids are saying, "Has Egypt been conquered?" So say to them, "The matter has been decided!" Jawhar has already passed Alexandria: The heralds have announced it, and victory is his!It seems that Jawhar preferred to follow very closely the policy designed by al-Muizz. In his proclamation (ahd al-aman) to the Egyptian populace in 358/969, Jawhar outlined a sagacious policy of religious toleration, reform, justice, tranquillity, security and peace. He was there to execute Fatimid policy which was aimed at pacifying Egypt in order that it might serve as a potential centre.