Facsimile · p. 87
The Fatimids, with firm hope of victory, were met by the fear of the Egyptians, who prayed to God for what the Creator had intended. The Egyptians were well prepared to ward off this disaster from Egypt. Many battles took place, resulting in the victory of the Egyptians. The Fatimids retreated, and the Egyptians pursued them to the borders of Egypt. Ubayd Allah, after this retreat, decided to postpone the conquest of Egypt to another time. He also fortified his strongholds, which were insufficient. He established a temporary capital, which he called Mahdia, after himself. He hoped to conquer Egypt and make it his capital. However, this conquest did not materialize for Ubayd Allah, nor for his first or second successor. In the year 322 AH, after Ubayd Allah al-Mahdi died at the age of 70, his son Abu al-Qasim Muhammad, known as al-Qa'im bi-Amr Allah, succeeded him as Fatimid Caliph. He was even more eager for conquest than his father. He gathered his armies and made preparations to march to Egypt and conquer it. Al-Qa'im saw greatness and glory in conquering Egypt. He sent his armies to Egypt, and they reached the borders of Egypt. He appointed Muhammad ibn Tughj to defend the western borders of Egypt and stationed a strong garrison there. However, this did not prevent the inevitable, as the Fatimids conquered Alexandria. After consolidating their position there, they advanced with their armies and entered Fustat, seizing a large amount of wealth. Al-Qa'im then decided that his army was not strong enough to conquer the capital, so he postponed it, hoping that the Abbasid state would weaken further, making its conquest easier. The Abbasid state was extremely weak, as its emirates were gradually becoming independent. The Qarmatians seized Syria and part of the Arabian Peninsula, the Samanids seized Khurasan, the Umayyads seized Andalusia, the Fatimids seized Africa, the Hamdanids seized the territory between the two rivers and Diyarbakir, and the Buyids seized Persia. Only Baghdad and some of its surrounding areas, and Egypt, remained under Abbasid control.
The Ikhshidid Dynasty When Abu Bakr Muhammad ibn Tughj, the ruler of Egypt, saw the disintegration of the Abbasid state and the division of the Islamic state, as mentioned above, he sought his share of power by declaring his independence in Egypt in the year 323 AH. The Caliph was forced to confirm him as ruler and, in addition, granted him Syria and the Hijaz. He was given the title of al-Ikhshid, which was the title of the rulers of Farghanah. He was of Persian origin.