Founded in the 13th century, gradually extended into a fortress with 14 bastions in the fortification wall. It served as a royal residence when the kings stayed in Šariš.