While the site had been occupied since the Bronze Age, the fort gained importance during the Byzantine Empire and came under control of local Armenian lords in the late 11th century. Baldwin I conquered the city in the winter of 1097, and it subsequently became a part of the County of Edessa. It was one of the main strongholds of Frankish counts such as Joscelin I. After the fall of Edessa to Zengi, it became the principal city of what remained of the County until it was eventually sold to the Emperor Manuel I Comnenus in 1150. It fell to Nur ed-Din's Muslims within the year.