Gohar el-Kaid incurred no delay in pushing his troops forward. He forced the passage of the Nile a few miles south of El-Gizeh at the head of his troops, and the Ikshidites suffered a disastrous defeat. To the honour of the African general, it is related that the inhabitants of Fostat were pardoned and the city was peaceably occupied. The submission of the rest of Egypt to Muiz was secured by this victory. In the year 359 a.h. Syria was also added to his domains, but shortly after was overrun by the Carmathians. The troops of Muiz met with several reverses, Damascus was taken, and those lawless freebooters, joined by the Ikshidites, advanced to Ain Shems. In the meanwhile, Gohar had fortified Cairo (the new capital which he had founded immediately north of Fostat) and taken every precaution to repel the invaders; a bloody battle was fought in the year 361 before the city walls, without any decisive result. Later, however, Gohar obtained a victory over the enemy which proved to be a decisive one.
Muiz subsequently removed his court to his new kingdom. In Ramadhan 362, he entered Cairo, bringing with him the bodies of his three predecessors and vast treasure. Muiz reigned about two years in Egypt, dying in the year 365 a.h. He is described as a warlike and ambitious prince, but, notwithstanding, he was especially distinguished for justice and was fond of learning. He showed great favour to the Christians, especially to Severus, Bishop of El-Ashmunein, and the patriarch Ephrem; and under his orders, and with his assistance, the church of the Mu’allakah, in Old Misr, was rebuilt. He executed many useful works (among others rendering navigable the Tanitic branch of the Nile, which is still called the canal of Muiz), and occupied himself in embellishing Cairo. Gohar, when he founded that city, built the great mosque named El-Azhar, the university of Egypt, which to this day is crowded with students from all parts of the Moslem world.
Aziz Abu-Mansur Nizar, on coming to the throne of his father, immediately despatched an expedition against the Turkish chief El-Eftekeen, who had taken Damascus a short time previously. Gohar again commanded the army, and pressed the siege of that city so vigorously that the enemy called to their aid the Carmathians. Before this united army he was forced to retire slowly to Ascalon, where he prepared to stand a siege; but, being reduced to great straits, he purchased his liberty with a large sum of money. On his return from this disastrous campaign, Aziz took command in person, and, meeting the enemy at Ramleh, was victorious after a bloody battle; while El-Eftekeen, being betrayed into his hands, was with Arab magnanimity received with honour and confidence, and ended his days in Egypt in affluence. Aziz followed his father’s example of liberality. It is even said that he appointed a Jew his vizier in Syria, and a Christian to the same post in Egypt. These acts, however, nearly cost him his life, and a popular tumult obliged him to disgrace both these officers. After a reign of twenty-one years of great internal prosperity, he died (a.h. 386) in a bath at Bilbeis, while preparing an expedition against the Greeks who were ravaging his possessions in Syria. Aziz was distinguished for moderation and mildness, but his son and successor rendered himself notorious for very opposite qualities.