هشام المؤيد بالله
Taking advantage of the absence of Sanchuelo, who had left to fight against the forces of Alfonso V of León, the Córdoba Caliphate leader Muhammad II of Córdoba in 1009 dethroned his cousin, the Caliph Hisham II al-Hakam. Sanchuelo returned quickly to Córdoba but the morale of his Berber army was low due to the lengthy campaign, and a majority of his army deserted him. As a result, he fell prisoner to Muhammad II and was executed a short while later.