From 1229 to 1244, Jerusalem peacefully reverted to Christian control as a result of a 1229 treaty agreed between the crusading Holy Roman Emperor Frederick II and al-Kamil, the Ayyubid sultan of Egypt, that ended the Sixth Crusade. The Ayyubids retained control of the Muslim holy places, and Arab sources suggest that Frederick was not permitted to restore Jerusalem's fortifications.