The Portuguese capture of Ceuta in 1415 had taken the Moroccans by surprise. In 1418, the Marinid sultan Abu Said Uthman III of Morocco led an army to recover it, but the siege failed. This led to widespread disaffection with the sultan and instability in the Marinid state. This culminated in a coup in Fez in 1420 (sometimes dated 1419), in which the sultan Abu Said Uthman III was assassinated, leaving behind only a one-year-old child, Abu Muhammad Abd al-Haqq II as son and heir, supported by Abu Zakariya. A succession struggle broke out immediately as other pretenders quickly emerged. Opportunistically, the Nasrid rulers of Granada and the Abdalwadids of Tlemcen intervened, each sponsoring different candidates for the Moroccan throne.