In 1229 after failing to conquer Egypt, Frederick II of the Holy Roman Empire made a peace treaty with Al-Kamil. This treaty allowed Christians to rule over most of Jerusalem, while the Muslims were given control of the Dome of the Rock and the Al-Aqsa Mosque. The peace brought about by this treaty lasted for about ten years. Many of the Muslims though were not happy with Al-Kamil for giving up control of Jerusalem, and in 1244, following a siege, the Muslims regained control of the city.