Crusader, Ayyubid, and Mamluk period
In 1099, The Fatimid ruler expelled the native Christian population before Jerusalem was conquered by the Crusaders, who massacred most of its Muslim and Jewish inhabitants when they took the solidly defended city by assault, after a period of siege; later the Crusaders created the Kingdom of Jerusalem. By early June 1099 Jerusalem’s population had declined from 70,000 to less than 30,000.
In 1187, the city was wrested from the Crusaders by Saladin who permitted Jews and Muslims to return and settle in the city.
Under the Ayyubid dynasty of Saladin, a period of huge investment began in the construction of houses, markets, public baths, and pilgrim hostels as well as the establishment of religious endowments. However, for most of the 13th century, Jerusalem declined to the status of a village due to city's fall of strategic value and Ayyubid internecine struggles.