Battle of Ourique The Battle of Ourique ( 25 July 1139 : St . James Day ) saw the forces of Portuguese Prince Afonso Henriques ( of the House of Burgundy ) defeat the Almoravid Moors led by Ali ibn Yusuf . Background . It was during the Battle of Valdevez against Alfonso VII of León that Muslim forces attacked and destroyed Leiria and Trancoso . Afonso Henriques ' s anxiety at this incursion at his southern frontier hastened his negotiations with Alfonso VII of León after Valdevez , leading to the Treaty of Zamora and freeing Afonso Henrique ' s troops to deal with the Muslim attack . Battle . Historians are divided as to the location of this battle . At the time , the name " Ourique " designated a large area south of Beja . Since 12th century chroniclers where unfamiliar with the region where the battle took place , they might have decided to call the location " camp of Ourique " for lack of a more precise term . Nonetheless , the great distance that separated Ourique from the Christian lines farther north has led some historians to suggest various localities in central Portugal , abandoning the traditional idea that the combat occurred in Ourique in the Alentejo . It would have been difficult for the then Count of Portugal , with a realm little beyond the Mondego River , to go all the way south to battle five Moorish Kings . One plausible alternative is Vila Chã de Ourique , located some ten miles from Santarém . However , incursions by Christian armies deep in Muslim territory were not unheard - of . Alfonso VII had directed expeditions that had reached Cordoba and Seville , well beyond the limits of Castillian dominions , and in 1147 he managed to conquer the Mediterrenean port of Almería , south of Granada . This was possible because the largest Almoravid armies were positioned at the frontier , while armies stationed in small towns would rather retreat into their castles than face a strong enemy force . Its not at all unfeasible that Afonso lead a raid into the Gharb , and then , while retreating , was intercepted by sizable Almoravid troops intending to crush his army . Despite the fact that the Christian Portuguese forces were strongly outnumbered , the Muslim armies were weakened by internal leadership problems , which led to Afonso Henrique ' s victory and subsequently his proclamation as King of the Portuguese , as Afonso I , with the support from his troops , vanquishing and slaying , so legend says , five Moorish kings . The earliest accounts provide little detail . In one account the Moorish forces are led by five Kings ( " Life of St . Theotonius " ) , while in another , the Muslim forces are under the command of one King , Ismar ( " Chronicles " ) . In the more detailed " Chronicle of the Goths " , Ismar waited until Henriques penetrated into Moslem territory , then systematically sent his troops from Seville , Badajoz , Elvas , Évora and Beja against the Portuguese count . Further , the Portuguese forces were surrounded on the hilltop where they encamped , Ismar hosted knights , who were executed later by Henriques , and that the Moorish king escaped in defeat . Arab and Spanish accounts do not clarify the circumstances , and confuse the issue , identifying the Ismar as , alternatively , Ismar Abuzicri or Ismar and Abuzicri , with later historians identifying Abu Zakariya , the governor of Santarém , as the protagonist . It is also likely that the numbers were inflated by the chroniclers from a large - scale raid to grand assault by Muslim forces . Aftermath . It was presumed that after his victory over the five Moorish kings , the nobles acclaimed Afonso Henriques as king . In reality , documents after his victory continued to refer to Henriques as Prince or Infante . Immediately after the battle , Afonso Henriques is said to have called for the first assembly of the estates - general ( ) of Portugal at Lamego , where he was given the Crown from the Bishop of Braga , to confirm the Portuguese independence from the Kingdom of León . This was a patriotic falsification perpetuated by the clergy , nobility and supporters who promoted the Restoration of Portuguese sovereignty and the claims of John IV , after the Iberian Union . The documents that refer to the estates - general were " deciphered " by Cistercian monks from the Monastery of Alcobaça to perpetuate the myth and justify the legitimacy of the Portuguese crown in the 17th century . The author of this falsification was Oliveira Marques , and even in 1632 there were misgivings about the validity of the chronicler ' s account or the existence of the Cortes of Lamego The account continued to support the notion that in the 12th century a meeting of the Cortes occurred in the Church of Santa Maria de Almacave , in Lamego , in 1143 . During this meeting , after being acclaimed by estates - general , Afonso Henriques accepted a group of laws on royal succession and excluded the Castilian line of Kings from the Portuguese throne , made provisions for the nobility , on justice and the independence of Portugal . But , even as Spanish jurists and diplomats later demonstrated that the document was uncreditable , the Portuguese defended the authenticity of the account . Alexandre Herculano later recounted the patriotic re - imagining in his " História de Portugal " , which caused its own controversy , and was later perpetuated by the writings of Alfredo Pimenta ( who defended the existence of the Cortes of Lamego ) . In commemoration of the Battle of Ourique , the first Portuguese coat - of - arms appeared that included five small shields , to represent the five defeated Moorish kings ( from one interpretation ) , which was later challenged by many authors . Legend . Some years later , the idea of a miraculous intervention in the battle by Saint James in favor of the Portuguese appeared in the chronicles of the battle . Saint James was widely venerated in Iberia ( with a main center of veneration in Santiago de Compostela , in Galicia , where his tomb was believed to be located ) , being generally seen as the " Matamouros " ( ) . As a consequence of Portuguese independence this legend was embellished with time , in order to distance the Portuguese from Spanish devotional practices and beliefs . Later interpretations replaced Saint James with Saint George and , finally , with Jesus Christ . In the legend , Afonso Henriques is visited before the battle by an old man who saw in a dream that Henriques would be victorious because God would intervene in his favour . He advised the nobleman to leave the encampment alone when he heard the bell of the local chapel . Riding off he was surprised by a ray of light that showed him ( in one interpretation ) the sign of the cross and Jesus Christ on a crucifix . Afonso Henriques knelt in its presence and heard the voice of Christ who told him he would defeat the Moors , which he , through courage and his faith , succeeded the following day . The legend of the miracle of the Battle of Ourique served thus as a political instrument to defend Portuguese independence as divine will . Yet , the legend first appeared in the 15th century and was forged by the monks of the Monastery of Santa Cruz , during the battles between John and the Kingdom of Castile . It was in 1419 that the legend first appeared in the " Crónica de Portugal " , and was accepted as fact , until Alexandre Herculano first reexamined the event , judging it a " pious fraud " , in his investigation in the middle of the 19th century .