In 1174, the citadel was captured by Saladin, the Ayyubid sultan of Egypt, who made it his residence and had the defences and residential buildings modified.
After his death, power struggles broke out between the other Ayyubid princes and although Damascus switched hands several times, the citadel was taken by force only once, in 1239.
[2] In 1076, Damascus was conquered by the Turkman warlord Atsiz ibn Uwaq, who established himself as the ruler of the city and began the construction of the citadel.
[4][5] After the death of Tutush I in 1095, Syria was divided between his sons Abu Nasr Shams al-Muluk Duqaq and Fakhr al-Mulk Radwan.
[6][7] During the rule of the Burid dynasty (1104–1154), work was carried out on the citadel in response to multiple attacks on Damascus by Crusader and Muslim armies.
[6] Crusader incursions prompted some improvements to the castle in the 1130s by Burid rulers, Taj al-Muluk Buri and Shams al-Mulk Isma'il.
This siege of Damascus ended within a week when an army led by Nur ad-Din Zangi, ruler of Aleppo and the son of Zengi, threatened the besieging Crusaders, forcing them to withdraw.
After an earthquake hit Damascus in 1170, Nur ad-Din built a wooden house for sleeping and prayer next to the original stone residence of the citadel.
At the death of Al-Aziz in 1198, several members of Saladin's family, including Al-Afdal and Az-Zahir Ghazi, ruler of Aleppo, allied themselves against Al-Adil and marched on Damascus.
[21] After his position as sultan of Egypt and emir of Damascus was secured, Al-Adil started an extensive rebuilding programme of the citadel.
[22] Several of Al-Adil's Ayyubid successors rebuilt many of the administrative and domestic structures inside the citadel, including residences, palaces, and a pool.
[22][24] The most likely motivation is that the defences of the old citadel became obsolete due to the introduction in the 12th century of the counterweight trebuchet, a siege engine easily capable of reducing thick stone walls to rubble.
The notables of Damascus started negotiations with the Mongol ruler Hulagu Khan; the city was handed over to his general Kitbuqa in 1260.
When the Mongol army left Damascus to quell rebellions in the countryside, the Ayyubid garrison of the citadel revolted, as they had been instructed to do by An-Nasir.
The mosque was reconstructed and enlarged, the towers were repaired, and the Blue Dome was covered with lead plates as the tiles themselves had been destroyed.
In 1400, the Mongol army under Timur, better known as Tamerlane, swept down on Syria and arrived at Damascus after having subdued Aleppo, Hama, and Baalbek.
In 1414, governor of Damascus Nawruz al-Hafizi, sought refuge in the citadel against the army of Sultan Al-Mu'ayyad Shaykh.
[38] When Ali Bey of Egypt, who opposed Ottoman overlordship, invaded Syria in 1771, the city of Damascus surrendered to him without a fight, except for the citadel.
In that year, the citizens of Damascus and the local garrison of Janissaries revolted against governor Mehmed Selim Pasha, who took refuge in the citadel.
[40] In 1860, Christian refugees from the Druze-Maronite conflict in Lebanon spilled into Damascus, resulting in tensions with the Muslim population.
There was a massacre of the Christian population, many of whom sought refuge in the citadel and eventually fled the city with the help of the Algerian–Damascene notable Abd al-Qadir al-Jaza'iri.
[41] Descriptions and photographs of the citadel by nineteenth-century European travellers indicate that the defences remained in relatively good shape until 1895, but that the structures inside the walls were reduced to complete ruins.
[47] In 2004 an agreement was signed between the DGAM and the Italian General Direction for Development Cooperation for a joint mission to renovate and reorganize the citadel and the National Museum of Damascus.
The Nahr Aqrabani, a canal branching off the Barada, flowed immediately below the northern wall and provided additional protection.
[45] Except for the western part of the curtain wall, the defensive works of the citadel that are still standing are primarily of Ayyubid date, with extensive Mamluk restorations.
The shops along the north side of the Al-Hamidiyah Souq are built against the citadel's southern façade, while parts of the eastern defences are also obscured by buildings.
During the Mamluk period, the eastern gate was one of two locations, the other being the Umayyad Mosque, where official decrees were posted, and this is reflected in a number of inscriptions that have been found here.
Based on stylistic evidence and inscriptions found in the citadel, the original construction of the Ayyubid gate can be dated to the period between 1210 and 1212.
Most of the outer gate tower has disappeared and a street now runs through the western arch that still survives, while the vaulted passage that led into the citadel is now used as a mosque.
The east and north gate complexes were connected through a 68 metres (223 ft) long vaulted passage that can also be dated to the reign of Al-Adil.