Castile, which had a powerful armada of ships anchored in the Bay of Gibraltar to blockade such reinforcement, had a few days previously to the siege, seen that fleet obliterated by the Muslim admiral, Abu Yusuf Yaqub at the Naval Battle of Algeciras.
Since the middle of the 13th century, the Marinid Dynasty was emerging as a new power in Morocco, ruled by Abu Yusuf Yaqub ibn Abd Al-Haqq.
The Marinids had established contact with the Muslims of Al-Andalus and offered soldiers to the King Muhammed II in his bitter struggle against the Reconquista of the Christian kingdoms to the north.
[1][2] From Castile, Ferdinand de la Cerda, who circumstantially governed the kingdom in the absence of his father, Alfonso X, found himself being interviewed by the pope in Beaucaire, could do no more than contain the invasions.
[3] Nuño González de Lara, who controlled the frontier of Córdoba, left from the city and gave battle against the Moroccans, dying in the action, but also forced the Muslims to withdraw from their advance.
[2] Due to the constantly threatened nature of the Castilian borderlands, the infante Fernando left Burgos in August to gather an army but became deathly ill and died a little while later at Ciudad Real.
The son of King James I of Aragon, also named Sancho, the Archbishop of Toledo, went to join the fight in Jaén, but not wanting to wait for Lope Díaz de Haro, Lord of Biscay, died in combat shortly thereafter.
The contemporary city stretched to the north of the Río de la Miel and possessed a complex defensive system of walls and entrances, probably being designed by the Almohads who had improved upon the original fortifications in the 8th century.
Many of the boats remained anchored off Isla Verde for this reason and by the time of the battle later that month, the fleet was easily destroyed by the Muslim galleys.
[19][page needed] By nightfall they had reached the outskirts of the Bay of Gibraltar and on 20 July the Muslim fleet attacked the now almost empty Castilian ships anchored at Isla Verde.
[18] The Castilian ground army, surprised by the rapid destruction of their navy, were helpless to stop the Muslims as their ships sailed into the city and their soldiers disembarked at the shipyard.
[22] After the battle, the King of Morocco built the Villa Nueva de Algeciras in the places where the siege works once stood so that future besiegers would not be able to use the same advantageous positions again.