The castle built in the 13th through 15th centuries towers over the town. In the first half of the 14th century, it became the residence of the Chamber Count. The town was immediately fortified with a double wall containing several bastions and towers. The castle represents a unique example of a very well preserved fortification system in Central Europe. In the 14th century, it developed into a multifunctional complex of buildings and thus became the centre of local administration, religious life, and defense. At the end of the 15th century, the Chamber Count moved to a newly built house with a unique diamond vault. Thereafter the residence of the Count in the castle was converted into the St. Catherine's Church.