As-Salih Ayyub

as-Salih Ayyub (5 November 1205-22 November 1249) was the penultimate male ruler of the Ayyubid Sultanate of Egypt, ruling from 1240 to 1249 and succeeding al-Adil II and preceding al-Muazzam Turanshah.

Biography
as-Salih Ayyub was born on 5 November 1205, the son of Sultan al-Kamil. In 1221, he was sent as a hostage to the crusaders in exchange for John of Brienne, and he was a hostage until the end of the Fifth Crusade and the failed siege of Damietta. In 1238, he was his father's designated heir on his death, but he had to seize power from his half-brother al-Adil II, who had taken power in Egypt. In June 1240, as-Salih entered Cairo and deposed his brother, becoming the ruler of the Ayyubid Sultanate. He bought large numbers of enslaved Kipchaks (there were unusually high numbers of them thanks to the Mongol Empire) in order to form the backbone of his army, which lacked loyal soldiers. He established two corps of mamluks, the first Ayyubid ruler to rely on them extensively. as-Salih had to deal with the mercenary Khwarezmians in Syria, rival Ayyubid rulers in the Levant, and the crusaders of the 1239-1241 Barons' Crusade, and he allowed the Khwarezmians to dominate rival Ayyubid rulers. They sacked Jerusalem in 1244, conquering it from the Kingdom of Jerusalem, and in 1245 as-Salih captured Damascus, with Caliph al-Musta'sim giving him the title of "Sultan". In 1246, he turned on his Khwarezmian allies, defeating them near Homs, killing their leader, and dispersing them throughout Syria and Palestine. He recaptured Jerusalem from the Khwarezmians that year, and he headed to al-Mansurah to fight against the Seventh Crusade, which was called in response to his recapture of Jerusalem. He died after his leg was amputated to remove an abscess in 1249, and he was the last major Ayyubid leader. In 1250, a long interregnum came to an end when the Bahri Sultanate took power.