A grandson of Alfonso VI
Portugal began as a county of the kingdom of León, the land around Porto and Coimbra between the Minho and the Mondego rivers. In 1096 Alfonso VI gave it to Henry, a knight from Burgundy, together with his illegitimate daughter Teresa. Afonso Henriques was their son. The year of his birth is not recorded: 1109 is the usual date, but historians have argued for 1106 and 1111, and both Guimarães and Viseu claim to be his birthplace.
Henry died in 1112 and Teresa ruled the county for her young son. She called herself queen and drew close to the powerful Galician family of Trava, whose head, Fernando Peres, became her partner. The barons of the Porto region turned to Afonso. On 24 June 1128, at São Mamede near Guimarães, his men defeated those of his mother and the Galicians. Teresa went into exile in Galicia and died there in 1130. From then on Afonso ruled alone.
From count to king
In 1139 Afonso led a raid deep into Almoravid territory and won a battle at Ourique, a place whose site is still argued over. From about this time he called himself king of the Portuguese. A later legend said Christ appeared to him before the battle, but it is first told centuries afterwards. His cousin Alfonso VII of León, who styled himself emperor, met him at Zamora in October 1143 and accepted the title, while keeping a claim to overlordship.
To make the title safe, Afonso placed his kingdom under the protection of the papacy and promised a yearly payment of four ounces of gold. Rome was slow to answer, since it did not want to offend León. Only on 23 May 1179 did Pope Alexander III, in the bull Manifestis probatum, call him king and confirm the kingdom to him and his heirs. By then he had married Mafalda, daughter of Count Amadeus III of Savoy, in 1146, and their son Sancho was grown.
Santarém and Lisbon, 1147
Almoravid power in al-Andalus was breaking up in the 1140s, and Afonso moved fast. On 15 March 1147 his men climbed the walls of Santarém by night and took it. That summer a fleet of English, Flemish, Rhineland and Norman crusaders, sailing to the Holy Land for the Second Crusade, put in at Porto. The bishop of Porto persuaded them to stay and help. In return Afonso promised them the plunder of the city and land to settle.
The siege of Lisbon began on 1 July and lasted seventeen weeks. Hunger and the crusaders' siege towers forced the city to surrender on 24 October 1147. The terms let the people leave with their lives, but the crusaders broke into the city and plundered it. An Anglo-Norman priest who took part described the campaign in a long Latin letter, De expugnatione Lyxbonensi, a vivid source written from the crusaders' side. Some of the northerners stayed, and an Englishman, Gilbert of Hastings, became the first bishop of Lisbon under Portuguese rule.
A frontier on the move
Sintra and Palmela gave up soon after Lisbon. Alcácer do Sal fell in 1158, and in 1165 Évora was taken by Geraldo Sem Pavor, "Gerald the Fearless", a freebooter who fought partly on his own account. In 1169 Afonso and Geraldo tried to take Badajoz. Ferdinand II of León, who claimed the city and was Afonso's son-in-law, came to the aid of its Muslim garrison. Afonso broke his leg against a gate as he fled, was captured, and had to give up lands in Galicia to be freed.
He never rode to war again. The Almohads, now masters of al-Andalus, struck back: in 1184 Caliph Abu Yaqub Yusuf besieged Santarém, where Afonso's son Sancho held out. The caliph was wounded and died on the retreat. Alongside the fighting, Afonso gave land to the military orders and to the new Cistercian abbey of Alcobaça, founded in 1153, which were to settle and hold the new frontier.
What he left
Afonso died at Coimbra on 6 December 1185 and was buried in the monastery of Santa Cruz there. His son Sancho I inherited a kingdom that reached from the Minho to the Tagus, with outposts beyond it. Portugal's borders with León and Castile would change little after the thirteenth century, and later Portuguese writers made Afonso the founder of the nation. Many of the stories they told about him, Ourique above all, are legend; the siege of Lisbon and the long rule are history.