Battle of Río Salado The Battle of Río Salado , also known as the Battle of Tarifa ( 30 October 1340 ) was a battle of the armies of King Afonso IV of Portugal and King Alfonso XI of Castile against those of sultan Abu al - Hasan ' Ali of Morocco and Yusuf I of Granada . Campaign . After his defeat at the Battle of Teba in 1330 , Mohamed IV of Granada sent to Abu Hasan for help in maintaining his survival . Hasan sent a fleet and an army that landed at Algeciras in 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 Morocco , Abu Hasan amassed his biggest army to undertake an invasion of Castile with the intention of undoing the previous century ' s Christian advances . This invasion was a final attempt by the Marinids to set up a power base in the Iberian Peninsula . The Marinids had mobilised a vast army and , after crossing the Strait of Gibraltar and defeating a Christian fleet at Gibraltar , proceeded inland to the Salado River near Tarifa , where they met the Christians . Preliminary Moves . During the winter of 1340 , Abu Hasan gathered his fleet : 100 war galleys concentrated at Ceuta under command of Muhammad ibn Ali al - Azafi . They landed an army at Gibraltar , and on 1 April 1340 they met the Castilian fleet ( 32 galleys and 6 naos , under Admiral Alfonso Jofre de Tenorio ) in the straits . Al - Azafi surrounded and destroyed the Castilian fleet ; Tenorio himself lost his life , and only 5 of his galleys managed to reach Cartagena . Abu Hasan crossed the Gibraltar straits on 14 August 1340 , and all through the summer troops and supplies were ferried across to the Peninsula . On 22 September the siege of Tarifa was formally established , with the help of Yusuf I . However the Sultan made a serious mistake : believing it would take many months for the Castilians to rebuild a fleet , and in the hope of cutting down the enormous cost of maintaining his own fleet , Abu Hasan prematurely laid up most of his galleys and returned those of his allies , leaving only 12 at Algeciras . Meanwhile , Alfonso XI had sought the aid of the King of Aragón and of his father - in - law , the King of Portugal . The latter sent a fleet led by the Genoese Manuel Pessanha and paid for the services of 15 Genoese galleys led by commander Micer Gil Bocanegra . With the addition of 27 ships hastily completed at Seville , the Christian fleets appeared in force in the Straits in October , cutting off the supply routes between Morocco and the Peninsula . Abu Hasan ' s position was now a difficult one , not only because the troops besieging Tarifa depended on supplies from Morocco , but also the Kingdom of Granada needed them , their forces having launched a series of limited attacks all along the frontier to hold the Castilians at bay . On 10 October , a severe storm wrecked 12 Castilian galleys , and the same day the Sultan launched an all - out assault against Tarifa , which was barely repulsed with heavy losses on both sides . Alfonso XI left Seville on 15 October 1340 with a relief army , joining the King of Portugal the next day . They advanced to the line of the Guadalete river and there awaited further Castilian and Portuguese contingents . At last on 26 October the combined army , now 20 , 000 - strong , crossed into enemy territory . When informed of their advance , Abu Hasan ordered the siege raised and his army took position on a hill between Tarifa and the sea . Yusuf I placed his army on an adjacent hill . On the 29th the Christian army reached the Deer Hill ( Hayar al - Ayyal ) , from Tarifa and barely 250 metres from the beach . Between them and their adversaries was a 4500m long valley crossed by the streams of La Jara and El Salado . During the night , Alfonso XI had sent 1 , 000 horse and 4 , 000 foot troops to reinforce the Tarifa garrison , hoping to surprise the enemy rearguard during the battle ; they had met only slight resistance by the light cavalry covering the Salado and reached Tarifa without difficulty . However , the officer commanding the light cavalry informed Abu Hasan that not a single Christian had managed to enter Tarifa during the night ; whether he made his report in good faith , or in fear of admitting failure will never be known , but this omission had serious consequences next day . The battle . The council of war decided that the Castilian King would attack the Sultan ' s main army , while the Portuguese host , reinforced by 3 , 000 Castilians , would engage Yusuf I . At nine o ' clock on the morning of 30 October 1340 they moved out of camp , leaving 2 , 000 raw militia to guard it . The strong Castilian vanguard was led by the Lara brothers , while the King himself rode in the main body . On the left were the missile troops from the Kingdom of León , led by Pedro Nuñez , and on the right Alvar Pérez de Guzmán with a cavalry corps . Reinforcing the Portuguese forces were the Military Orders of Alcántara and Calatrava . Abu Hasan had left the Jara crossing uncontested , but he deployed strong forces along the Salado . The Castilian vanguard met serious resistance ; Juan Manuel de Lara was unable to cross the shallow river , but the King ' s natural sons Fernando and Fadrique led a 800 - man detachment towards the right and captured a small bridge , repulsing the cavalry defending it . Alfonso reinforced them with his whole right wing and the Salado was successfully crossed . In the center , Juan Nuñez de Lara and the Military Order of Santiago finally smashed through the enemy line and crossed too , riding hard up the hill where Abu Hasan ' s camp was clearly visible . The forces hidden in Tarifa also attacked the Sultan ' s camp at the same time , and the troops defending it ( about 3 , 000 horse and 8 , 000 foot ) withdrew , half of them fleeing towards Algeciras and the other half joining the main struggle in the valley , where the Sultan ' s army was still largely intact . Alfonso now found himself dangerously isolated , with the right wing at some distance and the vanguard attacking the enemy camp . Abu Hasan ordered a general attack and the Castilian King himself was about to engage in hand - to - hand combat when the Archbishop of Toledo , Gil Álvarez Carrillo de Albornoz , grabbed his reins and prevented it . The timely arrival of the Castilian rearguard balanced the situation , and when the forces which had been sacking the Sultan ' s camp advanced down the hill and engaged the enemy from the rear , Abu Hasan ' s surrounded army broke and fled towards Algeciras . Meanwhile , the Portuguese contingent had crossed the Salado , and when Pedro Nuñez reinforced them the whole Granada contingent broke and left the field . The pursuit was ruthless , ending at the Guadamecí river , 6 km from the battlefield , although many remained in the hills , sacking the Sultan ' s rich camp . Little mercy was given here , and many of the Sultan ' s wives were killed , including his first wife Fatimah ( daughter of the Sultan of Tunis ) and Aysa ( daughter of the noble Abu Yahya ibn Yaqub ) . Other kinfolk of Abu Hasan were taken captives , including his sister Umalfat , his son Abu Umar Tasufin and his nephew Alí . Many notables were killed in the battle or the rout , such as Abu Tabit ibn Fath Allah , Abu Muyahid Gazi ibn al - Ka ' s and Muhammad ben Yahya ben Abi Bakr , also the famous writer from Granada , Abdullah ben Salmun , and the popular imam Ibn al - Khatib . Both Abu Hasan and Yusuf reached Algeciras ; the Sultan took refuge at Gibraltar , and that same night crossed to Ceuta in a galley . Consequences . The Marinids had suffered a disastrous defeat and moved back to Africa . Never again was a Muslim army able to invade the Iberian Peninsula . The war with Granada continued for 10 more years during which Alfonso XI made a few small territorial gains from the western part of Granada . Most importantly , the town of Algeciras , a valuable bridgehead held by the Marinids was finally retaken after a two - year siege in 1344 . This siege attracted volunteers from all over Europe due to extensive publicity . An attempt to recapture Gibraltar from the King of Granada was frustrated , however and Castile had to settle for isolation of the citadel from the rest of Muslim territory when peace was agreed in 1350 , after the death of Alfonso XI in his camp during the Black Death . Gibraltar was not captured until 1462 .