	It was considerably renovated in the 13th century (more precisely 1231) during the rule of Bulgarian tsar Ivan Asen II to serve as a border fortification against Latin raids, as evidenced by an eight-line wall inscription. The foundations of fortified walls—the outer ones being thick and preserved up to a height of , originally high—a feudal castle, 30 rooms and 3 water repositories have been excavated from this period.