The Battle of Ourique () took place on 25 July 1139, in which the forces of Portuguese count Afonso Henriques (of the House of Burgundy) defeated those led by the Almoravid governor of Córdoba, Muhammad Az-Zubayr Ibn Umar, identified as "King Ismar" in Christian chronicles. Background Learning that during his Battle of Valdevez against Alfonso VII of León, Muslim forces had 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, leading to the Treaty of Zamora and freeing Afonso Henriques'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 were unfamiliar with the region where the battle took place, they might have decided to call the location "field 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 Muslim kings. One plausible alternative is Vila Chã de Ourique, some 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 Mediterranean 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. It is feasible that Afonso led a raid into the Gharb, and then, while retreating, was intercepted by a sizable Almoravid force intending to crush his army and recover the spoils taken by the Portuguese. Before the battle, Count Afonso was hailed as rex (king) by his men in the Germanic fashion, by being lifted atop his shield by the leading nobles of Portugal. Despite the fact that the Christian Portuguese forces were strongly outnumbered, the Muslim armies were weakened by internal leadership problems, which led to Afonso