Ağdam (also, Agdam and Aghdam) was a town in the southwestern part of Azerbaijan and the capital of its Agdam Rayon. In July 1993, after heavy fighting, Agdam was captured by the forces of the Nagorno Karabakh Republic during its 1993 summer offensives. As the town fell its entire population fled eastwards. In the immediate aftermath of the fighting, the Armenian forces decided to destroy much of Agdam to prevent its recapture by Azerbaijan. More damage occurred in the following decades when the deserted town was looted for building materials. Agdam is currently a ruinous, uninhabited ghost town. However, the town’s large mosque survives in good condition.