Original built in the 5th and 6th century, the castle was later rebuilt in the 15th century after an earthquake flattened the city.