Once again, the city was exposed to a dramatic process of overturning its civilizational identity. Salah Eddin had wanted Jerusalem to return to its Islamic identity which was usurped by the Franks. His first steps were to remove most of what was added by the Franks inside Al-Haram Al-Sharif in terms of buildings, praying sites, paintings, and sculptures, and returning it, with all its components to an Islamic mosque, implementing many restorations. He also confiscated the home of the Latin Patriarch to the north of the Holy Sepulcher and around it, and turned it into a Sufi Khanqah (Al-Khanqah Al-Salahiyyah), after most residents of the Patriarch neighborhood left. He also acquired (by confiscation or purchase!) the St. Anne Church and turned it into a school for the Shafi'i school of religious thought (Al-Salahiyyah School), reverting it to its mission before the arrival of the Franks. He also placed the pulpit of NourEddinZinki, which was handcrafted in Aleppo to be placed in Al-Aqsa Mosque as soon as it is liberated, to the right of the Mihrab (prayer niche) which he rebuilt. He added more educational and Sufi institutions to Jerusalem, as well as a Bimaristan (hospital), turning part of the Knights of St. John headquarters in the Dabbaghah area (Tannery) for this purpose. He also fortified the city walls and its Citadel, and dug a moat to defend it. Salah Eddin also lavished funds from his wealthy Awqaf (religious property) on his institutions. One can notice that he confiscated Crusader religious property and diverted them to spend on the same buildings he confiscated, adding to their funds. His institutions inside the city were large and benefited many people. He also reinstated the Roman Orthodox to their status in the Church of the Holy Sepulcher.
It is clear that Salah Eddin realized the crisis of Jerusalem at the time, namely, the demographic crisis. He encouraged certain groups to reside in Jerusalem, including the Kurds, Moroccans, Turks, Turkumans, and Arabs of various origins, in addition to the children and grandchildren of those who survived the massacre from among the original residents of Jerusalem, who had fled to the rural areas which remained Palestinian, or to Damascus. He also brought to the city the residents of Ashkelon, whose city was destroyed. Among the Arab tribes who arrived in Jerusalem are BaniHareth, BaniMussah, and BaniSa'd. In fact, was it not for Salah Eddin's preoccupation, until the last day of his life, with military activities, fighting the remaining Franks in Bilad Al-Sham, and his preoccupation with organizing the affairs of his state, Jerusalem would have enjoyed more buildings carrying his name. It seems that the term "Al-Haram Al-Sharif" (the Holy Sancturay); Al-Aqsa Mosque, with all its buildings and walls, was enhanced during this period, becoming a term to describe this holy site. It also seems that the position of "Custodian of the Two Sanctuaries" (Jerusalem and Hebron), was established in this period, and continued to be used throughout the centuries.
The children and grandchildren of Salah Eddin, despite their bitter feuds over the rule, continued to take care of the city over the following period extending until 1250, leaving behind them a large number of public buildings, which continue to form an important part of the city, particularly in Al-Haram Al-Sharif area and its vicinity. It seems that surrounding Al-Haram with buildings was decided and implemented during the Ayyubid period, taking a new dimension, and even becoming complete during the Mamluk period.
The Ayyubids left Jerusalem without fortifications, with King Al-Mu'athamIssa demolishing the walls in 1219, when he felt incapable of defending the city from new waves of Franks. The only place that was saved was the Citadel, which was also destroyed in 1229.