Emperor
Frederick II had kept saying he would crusade and win but he kept failing to keep his promise. So in 1228 Pope Gregory IX
excommunicated him. Yet he still set sail from Brindisi and through diplomacy he achieved an unexpected success of taking
Jerusalem, Nazareth, and Bethlehem for the crusaders for ten years.
Frederick
II made a peace treaty with Al-Kamil which allowed the Christians to rule over most of Jerusalem, while the Muslims kept control
of the Dome of the Rock and the Al-Aksa mosque. Many of the Muslims though were not happy with Al-Kamil for giving up
Jerusalem and so in 1244 the Muslims took back the city.