after his defeat at the battle of teba in 1330, muhammed iv, sultan of granada sent to abu al-hasan 'ali of morocco for help in maintaining his survival. hasan sent a naval fleet and 5,000 troops that landed at algeciras in early 1333. these set about helping the granadan king to capture the castilian outpost of gibraltar, which he did after less than two months. they then conducted a limited campaign to reunite these territories to the realm of granada. back in magreb, abu hasan amassed his biggest army to undertake an invasion of castile with the intention of undoing the previous century's christian advances.