During the 9th century , a fortress was built , and soon after , a town was built around the fortress . In the 9th century â '' during the First Bulgarian Empire â '' a fortress was built in Haskovo that soon was transformed into a town .