Battle of Alcácer Quibir The Battle of Ksar El Kebir , also known as Battle of Three Kings , or " Battle of Oued El Makhazeen " in Morocco , and Battle of Alcácer Quibir in Portugal ( variant spellings are legion : Alcácer - Quivir , Alcazarquivir , Alcassar , meaning " grand castle " in Arabic ) , was fought in northern Morocco , near the town of Ksar - el - Kebir and Larache , on 4 August 1578 . The combatants were the army of the deposed Moroccan Sultan Abu Abdallah Mohammed II , with his ally , the King of Portugal Sebastian I , and a large Moroccan army nominally under the new Sultan of Morocco ( and uncle of Abu Abdallah Mohammed II ) Abd Al - Malik I . The Christian king , Sebastian I , had planned a crusade after Abu Abdallah asked him to help recover his throne . Abu Abdallah ' s uncle , Abd Al - Malik , had taken it from him with Ottoman support . The defeat of Portugal and attendant death of the childless Sebastian led to the end of the Aviz dynasty , and the integration of the country in the Iberian Union for 60 years under the Philippine Dynasty in a dynastic union with Spain . Prelude . Sebastian , who would later be known in Portugal as " the Desired " , was the son of the Infante Dom John ( son of John III of Portugal ) and Joanna , daughter of the Emperor Charles V . His father died before he was born , and he became king at the age of three after the death of his grandfather in 1557 . He was educated almost entirely by Jesuits , by his guardian and tutor Aleixo de Meneses and by Catherine of Austria , sister of Charles V and wife of King John III . Some , judging him after his defeat , alleged that under these influences his youthful idealism soon mutated into religious fanaticism , although he never joined the Holy League . The Portuguese Cortes asked Sebastian several times to go to Morocco and stop the turmoil of the advancing Turkish military presence , because the Ottomans would be a threat to the security of the Portuguese coasts and to the commerce with Guinea , Brazil and the Atlantic Islands . But it was only when Abu Abdallah Mohammed II Saadi went to Portugal and asked for Sebastian ' s help in recovering his throne from his uncle that Sebastian decided to mount a military effort . Sebastian felt driven to revive lost glories by intervening in North Africa , influenced by the events such as the defense of Mazagan in 1562 from a Moroccan siege . Accordingly , in 1568 , the kingdom began to prepare for intervention in Morocco . This policy was not only supported by the mercantile bourgeoisie as it would benefit commerce in this area ( primarily , gold , cattle , wheat and sugar ) , but also by the nobility . Up to that time Portuguese military action in Africa had been confined to small expeditions and raids ; Portugal had built its vast maritime empire from Brazil to the East Indies by a combination of trade , sea exploration and technological superiority , with Christian conversion of subject peoples being one , but by no means the only , end in view . Sebastian proposed to change this strategy entirely . In 1574 Sebastian led a successful raid on Tangier , which encouraged him to grander designs against the new Saadian ruler of Morocco . He gave his support to Abu Abdallah Mohammed II Saadi , who was engaged in a civil war to recover the throne of Morocco from his uncle , the Emir Abd Al - Malik - who was aided by the Ottomans . Despite the admonitions of his mother and his uncle Philip II of Spain ( who had become very cautious after the Battle of Djerba ) , Sebastian was determined to wage a military campaign . Sebastian used much of Portugal ' s imperial wealth to equip a large fleet and gather an army including several nationalities of foreign soldier : 2 , 000 volunteers from Spain ( Castile ) and 3 , 000 mercenaries from Flanders and Germany , as well as 600 Italians initially recruited to aid an invasion of Ireland under the leadership of the English adventurer , Thomas Stukley . It is said that the expeditionary force numbered 500 ships , and the army in total numbered about 18 , 000 men , including the flower of the Portuguese nobility . Campaign . After haranguing his troops from the windows of the Church of Santa Maria in Lagos , Sebastian departed that port in his armada on 24 June 1578 . He landed at Arzila , in Portuguese Morocco , where Abu Abdallah joined him with an additional 6 , 000 Moorish allied troops , and marched into the interior . The Emir , who was gravely ill , had meanwhile collected a large army , rallying his countrymen to jihad against the Portuguese invaders . The two armies approached each other near Ksar - el - Kebir , camping on opposite sides of a Loukkos river . Battle . On 4 August , the Portuguese and Moorish allied troops were drawn up in battle array , and Sebastian rode around encouraging the ranks . But the Moroccans advanced on a broad front , planning to encircle his army . The Sultan had 10 , 000 cavalry on the wings , and in the center he had placed Moors who had been driven out of Spain and thus bore a special grudge against Christians . Despite his illness , the Sultan left his litter and led his forces on horseback . The battle started as both sides exchanged several volleys of gunfire from musketry and artillery . Stukley , commanding the Portuguese center , was killed by a cannonball early in the battle . The Ottoman - Moroccan cavalry advanced and began to encircle the Portuguese army . Both armies soon became fully engaged in melee . The flanks of the Portuguese army began to give way to the Moorish cavalry , and eventually the center became threatened as well . Seeing the flanks compromised , and having lost its commander early in battle , the Portuguese center lost heart and was overcome . The battle ended after nearly four hours of heavy fighting and resulted in the total defeat of the Portuguese and Abu Abdallah ' s army with 8 , 000 dead , including the slaughter of almost the whole of the country ’ s nobility , and 15 , 000 taken prisoner ; perhaps 100 survivors escaped to the coast . The body of King Sebastian , who led a charge into the midst of the enemy and was then cut off , was never found . The Sultan Abd Al - Malik also died during the battle , but from natural causes ( the effort of riding was too much for him ) , and the news was concealed from his troops until total victory had been secured . Abu Abdallah attempted to flee but was drowned in the river . For this reason , the battle was known in Morocco as the Battle of the Three Kings . Legacy . Abd Al - Malik was succeeded as Sultan by his brother Ahmad al - Mansur , also known as Ahmed Addahbi , who conquered Timboktu and the Mali Empire . For Portugal , the battle was an unmitigated disaster . Despite the lack of a body , Sebastian was presumed dead , at the age of 24 . In his piety , he had remained unmarried and had sired no heir . His aged , childless uncle Henry of Portugal , a Cardinal of the Roman church , succeeded to the throne as closest legitimate relative . His brief reign ( 1578 – 1580 ) was devoted to attempting to raise the crippling financial reparations demanded by the disastrous Morocco venture . After his death , legitimate claimants to the throne of the House of Aviz , which had ruled Portugal for 200 years , were defeated by a Castilian military invasion . Philip II of Spain , a maternal grandson of Manuel I of Portugal , and nearest male claimant ( being an uncle of Sebastian I ) , invaded with an army of 40 000 men , defeating the troops of Anthony , Prior of Crato at the Battle of Alcântara and was crowned Philip I of Portugal by the Cortes of Tomar in 1581 . Later , at the beginning of his reign , Philip II ordered that the mutilated remains said to be Sebastian ' s ( and so recognized after the battle by some of his close companions ) , and still in North Africa , be returned to Portugal , where they were buried at the Jerónimos Monastery , in Lisbon . Portugal and its Empire were not " de jure " incorporated into the Spanish Empire , and remained as a separate realm of the Spanish Habsburgs until 1640 when it broke away through the Portuguese Restoration War . Despite this disastrous defeat , a cult of ' Sebastianism ' , with the young monarch as Portugal ' s " " Once and Future King " " who would one day , like King Arthur , return to save his nation , has ebbed and flowed in Portuguese life ever since , and was particularly strong late in the 19th century as a Romantic revivalism , some saying that to be one of the causes of the decadence and lack of attitude in late Portuguese History . For 40 years after the battle , a series of impostors attempted to claim that they were Sebastian returned from the dead .