The location of the current citadel was first fortified in 1076 by the Turkman warlord Atsiz bin Uvak, although it is possible but not proven that a citadel stood on this place in the Hellenistic and Roman periods. After the assassination of Atsiz bin Uvak, the project was finished by the Seljuq ruler Tutush I. The emirs of the subsequent Burid and Zengid dynasties carried out modifications and added new structures to it. During this period, the citadel and the city were besieged several times by Crusader and Muslim armies. 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.