Sultan of Egypt was the status held by the rulers of Egypt after the establishment of the Ayyubid dynasty of Saladin in 1174 until the Ottoman conquest of Egypt in 1517. Though the extent of the Egyptian Sultanate ebbed and flowed, it generally included Sham and Hejaz, with the consequence that the Ayyubid and later Mamluk sultans were also regarded as the Sultans of Syria. From 1914 the title was once again used by the heads of the Muhammad Ali dynasty of Egypt and Sudan, later being replaced by the title of King of Egypt and Sudan in 1922.
Prior to the rise of Saladin, Egypt was the center of the Shia Fatimid Caliphate, the only period in Islamic history when a caliphate was ruled by members of the Shia branch of Islam. The Fatimids had long sought to completely supplant the Sunni Abbasid Caliphate based in Iraq, and like their Abbasid rivals they also took the title Caliph, representing their claim to the highest status within the Islamic hierarchy. However, with Saladin's rise to power in 1169, Egypt returned to the Sunni fold and the Abbasid Caliphate. Recognizing the Abbasid Caliph as his theoretical superior, Saladin took the title of Sultan in 1174, though from this point until the Ottoman conquest, supreme power in the caliphate would come to rest with the Sultan of Egypt.
In 1250, the Ayyubids were overthrown by the Mamelukes, who established the Bahri dynasty and whose rulers also took the title sultan. Notable Bahri sultans include Qutuz, who defeated the invading Mongol army of Hulagu at the Battle of Ain Jalut, and Baibars, who finally recaptured the last remnants of the Crusader Kingdom of Jerusalem. The Bahri were later overthrown by a rival Mameluke group, who established the Burgi Dynasty in 1382.