The citadel was used as a royal residence, treasury, prison and arsenal under the Durrani Empire in the 18th century. It suffered some damage during the Anglo-Afghan War in the 19th century. A modern citadel ("Arg-e Herat") was built immediately to its north in the mid-19th century to take over its defensive function. The citadel was saved from demolition in the 1950s, and was excavated and restored by UNESCO between 1976 and 1979. It suffered more damages during the last decades of wars and neglect.