When the First Crusade defeated the Fatimid Caliphs and captured Jerusalem in 1099 AD, people were very upset. People in Egypt and Syria gradually decided that the Fatimids were too weak to rule anymore. One of their generals, Saladin (Salah ad-Din ibn Ayyub in Arabic), took over control from the Fatimids. He founded the Ayyubid dynasty (ai-YOU-bid).
Saladin, the Sultan of Egypt, was Kurdish, from Tikrit in northern Iraq. He came to Egypt in 1168, when he was 31 years old, as an assistant to his uncle, who was a general and then became the vizier of the last Fatimid caliph. After Saladin’s uncle died the next year, Saladin took power for himself.
In 1173 Saladin’s older brother Turanshah conquered Yemen, in the Arabian Peninsula. That gave Saladin control of the very profitable trade from India through the Red Sea. Saladin was a very successful general. He followed the Mamluk generals Zangi and Nureddin in taking back most of the territory that had been lost to the First Crusade. Saladin won back Jerusalem in 1187 AD. He built the great wall that surrounds Jerusalem’s Old City today. Saladin’s attitude towards the conquered Europeans was unusually kind – unlike the Athenians, who murdered the Melians, or Alexander, who killed the men of Tyre. Saladin let the Europeans leave the city and take ships back to Europe. People began to see Saladin as a kind and fair ruler.
Saladin was a Sunni Moslem, so he brought back Sunni worship to Egypt and Syria, even though the Fatimids had been Shiites. He opened a series of madrassas, or schools, which helped to bring Sunni faith to the people, and also spread science and math from the big university in Baghdad to Egypt and Syria. A lot of medical research started up in Cairo – first Maimonides (who also worked as Saladin’s doctor) and then Ibn al Nafis. This also brought the Ayyubids closer to the Seljuks in Baghdad. Saladin died of a fever in 1193 AD, when he was 56 years old. (Probably some of his good reputation comes from dying pretty young, before he got old and things fell apart.) He was buried in Damascus, next to the great Umayyad Mosque there.
After his death, Saladin’s sons and relatives broke up his empire. That way they could each have their own small kingdom to rule. There were small kingdoms at Damascus, Aleppo, Hims, Hamat, and Diyar Bakr. But the Ayyubid sultans of Egypt were the richest, so they mostly controlled all the smaller kingdoms. Scholars and preachers like Maimonides and Francis of Assisi visited or lived in Cairo, the richest city of the rich Ayyubid sultanate. When Pope Honorius attacked Egypt in the Fifth Crusade, the Ayyubids fought them off.
The later Ayyubids bought enslaved Turkish and Mongol people to be their army rather than fighting themselves. People called these enslaved soldiers the Mamluks. But little by little the Ayyubid sultans had less and less power and the Mamluks got more and more power. In the Sixth Crusade, the Crusaders fought as mercenaries for the Ayyubids against the Mamluks in exchange for control over Jerusalem. Finally in 1250 AD the Mamluks took over Egypt entirely. By 1260 the Mamluks had also taken over most of the other Ayyubid kingdoms.