(preventing any intervention Nur al-Din may have been planning) and ruled effectively. 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. The Crusaders in the Kingdom of Jerusalem were not unaware of the delicate nature of their position and sought to establish a functional relationship with Ibn Ruzzik, culminating with a truce between the two states with Egypt paying large annual sums to Jerusalem as one of the conditions. In 1161, Ibn Ruzzik was assassinated and with him died stability in Egypt. Ibn Ruzzik's son succeeded him but was quickly overthrown by the Arab governor of upper Egypt, Shawar, in 1163. In the same year Shawar himself was almost immediately overthrown by a courtier named Dirgham. Shawar fled Egypt and sought aid from Nur al-Din in Syria. The internal chaos of 1163 spilled over onto the international arena when the new king of Jerusalem, Amalric I, undertook a punitive campaign in Egypt in response to the failure of the Egyptian to pay their annual tribute. 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. Social The official doctrine of the Fatimid state was Isma'ilism, a branch of Shi'a Islam espoused by the Fatimids. 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. The Fatimids' claim of descent from Ali was challenged already during the 10th century, both by the Sunni Abbasids but also by many Shi'ites, who rejected their legitimacy and claimed that they were impostors. Most Egyptians rejected Ismailism and practised Sunni Islam. Tensions were further exacerbated as the Caliphs steadily lost power, including the power to support their state religion. Into this growing void stepped Sunni Islam, which thrived in Egypt's north especially around the city of Alexandria. Already in , the military strongman Nasir al-Dawla ibn Hamdan had tried to depose the dynasty and restore Sunni rule over Egypt. The prestige of the caliphate diminished further following a series of deeply divisive schisms within the Isma'ili faith itself, over the succession to the imamate/caliphate: the Nizari