Salah al-Din Yusuf ibn Ayyub (1137 – 4 March 1193), commonly known as Saladin (Honour of the Faith), was the founder of the Ayyubid dynasty. Hailing from a Kurdish family, he was the first sultan of both Egypt and Syria. An important figure of the Third Crusade, he spearheaded the Muslim military effort against the Crusader states in the Levant. At the height of his power, the Ayyubid realm spanned Egypt, Syria, Upper Mesopotamia, the Hejaz, Yemen, and Nubia.
Alongside his uncle Shirkuh, a general of the Zengid dynasty, Saladin was sent to Egypt under the Fatimid Caliphate in 1164, on the orders of Nur al-Din. With their original purpose being to help restore Shawar as the vizier to the teenage Fatimid caliph al-Adid, a power struggle ensued between Shirkuh and Shawar after the latter was reinstated. Saladin, meanwhile, climbed the ranks of the Fatimid government by virtue of his military successes against Crusader assaults as well as his personal closeness to al-Adid. After Shawar was assassinated and Shirkuh died in 1169, al-Adid appointed Saladin as vizier. During his tenure, Saladin, a Sunni Muslim, began to undermine the Fatimid establishment; following al-Adid's death in 1171, he abolished the Cairo-based Isma'ili Shia Muslim Fatimid Caliphate and realigned Egypt with the Baghdad-based Sunni Abbasid Caliphate.
In the following years, he led forays against the Crusaders in Palestine, commissioned the successful conquest of Yemen, and staved off pro-Fatimid rebellions in Egypt. Not long after Nur al-Din's death in 1174, Saladin launched his conquest of Syria, peacefully entering Damascus at the request of its governor. By mid-1175, Saladin had conquered Hama and Homs, inviting the animosity of other Zengid lords, who were the official rulers of Syria's principalities; he subsequently defeated the Zengids at the Battle of the Horns of Hama in 1175, and was thereafter proclaimed the 'Sultan of Egypt and Syria' by the Abbasid caliph al-Mustadi.