Ayyubid Sultanate

The Ayyubid Caliphate, also known as the Ayyubid Empire, Dynasty, Saladin Dynasty, or the Ad-Din Dynasty was the ruling dynasty over Egypt from 1170 until their collapse in 1250; they actually held out until 1341, ruling Hasankeyf in Turkey. The dynasty would rule until the early 1500s when the Ottoman Empire took over.

Early History
The Ayyubid Caliphate was founded by Najm ad-Din, a Mameluk slave soldier who was in the service of the Zengid Empire. Najm invaded the Shiite Fatimid Caliphate of Egypt in 1170 and overthrew the last Fatimid caliph, although Al-Fayed of Aila held out until 1184. This ruling dynasty was close in relations with the Zengids and The Turks, and were enemies of Amalric I of Jerusalem, who attempted to overthrow the rule of Shirkuh, the brother of Najm ad-Din. Najm was devoted to consolidating his domains in northern and central Egypt, called the "Ayyubids" after his personal name, Ayyub.

Expansion
In 1173 Salah ad-Din, his son, became Sultan when Najm died in a horse riding accident. "Saladin", as he was internationally known, expanded the empire from 1174 until 1193, when he died. Salah ad-Din was responsible for defeating the last remnants of the Fatimid Caliphate from 1178-1184 by capturin the city of Aila from Al-Fayed, the professed Caliph, and he started his war against Jerusalem by capturing Kerak in 1178. He proceeded to capture the city of Ascalon in 1180, followed by Arsuf and then Jerusalem in 1188. He captured most of the Kingdom of Jerusalem before a Third Crusade was called in 1189. In 1190 Frederick Barbarossa, the Holy Roman Emperor, drowned while crossing the Kalycadnus River, and his sorrowful knights returned home. From 1190 until 1192 he fought the Crusade of Kings: Richard the Lionheart of England and Philip II Augustus of France. He died in 1193 after defeating the crusaders. After his death, there was a succession war that would last until 1200.

Succession War
Al-Adil, his brother, exercised control over the diplomatic situations after his death, but Al-Afdal, Al-Aziz, and Al-Zahir fought over the empire. Al-Aziz won the war after capturing Al-Afdal's Middle Eastern territories, and he was Sultan until his death in 1198. Al-Afdal reigned briefly before his death, and Al-Adil reigned until his death in 1218. The succession war had little short-term impact, but it showed the first cracks in the regime.

Recapture of Jerusalem
The Ayyubids saw off the Fifth Crusade, with Al-Kamil defeating Andrew III of Hungary's 50,000 troops. In 1237 he negotiated a peaceful handover of Jerusalem to Frederick II of Germany, but when he died the following year, the Ayyubids instantly recaptured the city. This would be the last attempt to recapture Jerusalem on land, and the last successful Crusader occupation.

Fall of the Regime
Louis IX of France planned several ventures of attacking Jerusalem through Egypt, and in 1248, he assaulted Damietta. He failed in his attack, losing at the Battle of Farrukhsiyar. However, the regime changed when the Mamelukes, slave soldiers led by Baybars, threw off their shackles and created their own regime in 1250. The Ayyubids were nominally the rulers, but Baybars exercised real power.

The event widely seen as the fall of the Ayyubids occurred when Qutuz was assassinated in 1260 by Baybars after returning home from the Battle of Ain Jalut, in which Baybars defeated the Mongol Empire. Baybars took over Egypt and the Middle East, but Principality of Hama ruled for years later. In 1341 the final ruler of the Principality of Hama was deposed by the Mamelukes, ending the Ayyubid Empire.