 The Castilians were forced to lay a long and difficult siege.The brave defiance of little Capilla, and al-Bayyasi's shipping of provisions to the Castilian besiegers, soon turned opinion against him and back towards the Almohad Caliph.An uprising in Cordoba followed, al-Bayyasi was killed and his head dispatched to the Caliph in Marrakesh.