Originally built in 1262 after the conquest of the city by Alfonso X, it was completely rebuilt by 1602 after the first building was burned down by a combined Anglo-Dutch fleet commanded by Admiral Edward Howard, who sacked Cádiz in 1596.