The Castilian nobleman Rodrigo Diaz de Vivar, known as "El Cid", who was intent on possessing his own principality on the Mediterranean, entered the province in command of a combined Christian and Moorish army and besieged the city beginning in 1092.
V času vladavine Abd al-Aziza je bilo zgrajeno novo mestno obzidje, ostanki so se ohranili v starem mestu ("Ciutat Vella") do danes.