Al-Kamil's father was laying siege to the city of Mardin (in modern-day Turkey) in 1199 when he was called away urgently to deal with a security threat in Damascus.
[3] Taking advantage of the Sultan's absence, the combined forces of Mosul, Sinjar and Jazirat ibn Umar appeared at Mardin when it was on the point of surrender, and drew Al-Kamil into battle.
Although he was badly defeated and retreated to Mayyafariqin,[4] dissent and weakness among his opponents meant that Al-Kamil was able to secure Ayyubid rule in the Jazira Region by taking Harran (in modern-day Turkey).
[7] It appears that Al-Adil allowed Al-Kamil a fairly high degree of authority, since he oversaw much of the work on the Cairo Citadel, issued decrees in his own name, and even managed to persuade his father to dismiss the powerful minister Ibn Shukr.
Unusually for an Ayyubid succession, there was no obvious dissent or rivalry between the brothers at this point, partly because just before Al-Adil's death, Egypt had been attacked by the forces of the Fifth Crusade.
In 1219 he was almost overthrown by a conspiracy led by the amir Imad ad-Din ibn al-Mashtub, commander of the Hakkari Kurdish regiment, to replace him with his younger and more pliant brother al-Faiz Ibrahim.
Al-Kamil considered fleeing to Yemen, which was ruled by his son al-Mas'ud Yusuf, but the timely arrival of his brother Al-Muazzam from Syria with reinforcements brought the conspiracy to a swift end.
After this there was little action until 1221, when al-Kamil offered peace again, proposing to surrender the entire territory of the Kingdom of Jerusalem, except Transjordan, in return for the Crusaders evacuating Egypt [13] but was again refused.
In the following years there was a power struggle with his brother al-Mu'azzam, and al-Kamil was willing to accept a peace with emperor and King of Sicily Frederick II, who was planning the Sixth Crusade.
In February 1229 al-Kamil negotiated the Treaty of Jaffa, a ten-year peace with Frederick II and returned Jerusalem and other holy sites to the Crusader kingdom.