Moors swept through the town in 1109, putting its garrison to the sword and claiming its fortress.
During a counter-offensive in 1109, the town was overrun by the Moors, but the Christianized fortress held.