Badr and his successors, who were mostly drawn from the military, combined the vizierate with the post of "commander of the armies" and held full powers in the caliph's stead.
These killings sparked a revolt by the Armenian governor of Middle Egypt, Tala'i ibn Ruzzik, who was aided by Sitt al-Qusur, sister of the young caliph al-Fa'iz.
Under Ibn Ruzzik, Egypt regained some measure of international influence, successfully defending itself from naval molestation, raiding opposition shipping in the Eastern Mediterranean, and engaging in negotiations with Nur al-Din concerning a unified jihad against the Crusader States.
Amalric's campaign was stopped not by the Fatimid military, but rather the flooding Nile that crippled his army while they laid siege to the town of Bilbays in northern Egypt.
[8] According to Isma'ili beliefs, the caliph was also the imam, the divinely chosen and guided heir of the Prophet Muhammad, in direct and unbroken succession via Ali ibn Abi Talib.
[3] In addition to this mounting religious pressure the ever unstable nature of Egyptian political life forced elites in every field (administrative, poetic, legal, etc.)
For once the weakness of the Fatimid state served as an advantage as people of all religious backgrounds capitalized on all aspects of the thriving trade and succeeded in creating a surprisingly successful financial system.
Nur al-Din had long sought to intervene in Egypt especially after missing his opportunity when Tala ibn Ruzzik successfully brought the country under control, blocking his ambitions for nearly a decade.
Nur al-din sent the head of his army Shirkuh (who in turn took his nephew, Saladin, with him) to accompany Shawar back to Egypt and return him to power.
Once Dirgham had been overthrown, however, it quickly became clear that Shawar was not going to uphold his agreement, neither paying tribute to Nur al-Din nor giving Shirkuh's troops the fiefs he had promised.
[13] He ultimately enticed Amalric into an alliance against Nur al-Din by making several concessions including the release of Christian prisoners and submitting to the Kingdom of Jerusalem.
Nur al-Din took advantage of the absence of Amalric and Jerusalem's army to attack the Crusader States, winning a pitched battle and retaking the city of Harim.
In his first major military position, Saladin managed to organize a continued defense of the city and maintain the support of the population, despite great suffering brought on by the long siege.
Shirkuh remained largely inactive in the countryside, failing to attack either the besieging army or the garrisoned city of Cairo, which held the Fatimid Caliph.
[16][17] Facing internal pressures stemming from his unpopular alliance with Amalric, Shawar tried to negotiate with Nur al-Din to keep Shirkuh from attacking Egypt for a third time.
Hearing of Shirkuh's arrival in Egypt in January 1169, Amalric quickly negotiated a truce with Shawar (including the usual payments by the Egyptians in exchange for withdrawal) and returned to Jerusalem.
This challenge was increased because Saladin's overlord, Nur al-Din, knew little of his deceased emir's nephew, other than that he was from the famously ambitious Ayyubid family.
Saladin almost immediately faced challenges from the established pro-Fatimid military and civilian elites, who feared that the presence of a foreign Sunni vizier would result in the destruction of their dynasty.
Clearly feeling secure in Egypt Saladin undertook attacks against the Kingdom of Jerusalem in 1170 and succeeded in taking the strategic town of Ayla.
He withdrew early from the 1171 campaign, which was supposed to be an assault on the Crusader fortress of Karak with Nur al-Din Zangi, partially because he wanted to avoid meeting his master and officially due to the death of his father.
In order to reign in his vassal and gain favor with the Abbasid Caliph, Nur al-Din commanded Saladin to overthrow the Fatimid Dynasty in June 1171.
Men like Qadi al-Fadil provided Saladin with the more than just their ample skills, but also with direct connections into the complicated social/political circles that held power in the Fatimid State.
Finally, Saladin's famed tolerance towards non-Muslims emerged when he allowed the Coptic Christians and Jews, who were deeply ingrained into Egypt's highly successful financial system, to retain their posts.
The extent to which Saladin may have intentionally underpaid Nur al-Din is unknown, but it is likely that the tombs of the Pharaohs were finally running dry after being so heavily tapped by previous viziers.
There is little doubt that Saladin's actions looked suspicious as he continued his reforms across Egyptian society, including the elimination of many taxes in contradiction with Islamic law, and began construction of a formidable navy.
Among these were his nephew Taqi al-Din Umar, who expanded Saladin's domains westward to the borders of the Almohad Empire in 1173, and his brother Turanshah, who invaded Yemen and deposed its heretical leader in 1174.
Early in the year, when his ambitious brother departed for Yemen, Saladin discovered a major plot to return the Fatimids to power and dealt with the conspirators swiftly and brutally.