The castle served as an administrative centre, prison, military base and a refuge for the citizens.
O castelo exerceu como centro administrativo, prisión, base militar e refuxio para a cidadanía.