 In 1842, the garrison (loyal to the Madrid government) shelled parts of the city.It served as a prison, often holding political prisoners, until the time of General Franco.The castle was also the site of numerous executions.