Archaeologists have found ceramics on the site that date the fortifications back to a Carthaginian compound in the 3rd century b.c., and there is ample evidence that the Romans also fortified the spot. (That garum trade was worth protecting, apparently.) The castle that survived, though, was built in the 13th century by the Nasrid dynasty that also constructed the Alhambra. The structure was famous for its prison and the dungeon where political prisoners were kept. The Spanish monarchs modified the structure but kept its prison operative until 1808, when the castle was severely damaged by English bombardment.