The tower of Hercules and the layout of the cloister on the parade ground have come from the primitive palace of the 13th century. It is believed that it was Aliman's palace. In the 16th century it was handed over to the Dominican nuns who built the church and other dependencies of the convent.