The Crusaders conquered the city in 1099 and held it until its conquest by the army of Saladin at the siege of Jerusalem in 1187 and its surrender to the Ayyubid dynasty, a Muslim sultanate that ruled in the Middle East in the early 12th century. The Sixth Crusade put Jerusalem back under Crusader rule from 1229 to 1244, until the city was captured by the Khwarazmians. The Crusader–Ayyubid conflict ended with the rise of the Mamluks from Egypt in 1260 and their conquest of the Holy Land.
The Ayyubid period ended with waves of destruction of the city. Its fortifications were destroyed first, and later most of the buildings, as part of a deliberate scorched earth policy intended to prevent all future crusades from gaining a foothold in the city and region.















