Portugal's first king began by defeating his own mother in battle
Afonso Henriques was exiled by his mother at twelve. At about twenty he beat her army near Guimarães, sent her off to Galicia and took charge of the County of Portugal. Over the next half-century he turned that county into a kingdom, doubled its size, and talked the pope into recognising it.
Afonso was the son of Henry of Burgundy and Theresa, an illegitimate daughter of King Alfonso VI of León, who together ruled the County of Portugal. Even his birth is contested: the year may be 1106, 1109 or 1111, and Guimarães, Viseu and Coimbra all claim him, a question that caused real outrage when a historian proposed Coimbra in 1990. His father died in 1112, leaving Theresa to govern alone; she even styled herself queen.
Theresa's alliance with, and romance with, Fernando Pérez de Traba, the most powerful count in Galicia, alarmed the Portuguese nobility and the Archbishop of Braga, who rallied behind her son. She exiled him in 1120. At the Battle of São Mamede in 1128 Afonso defeated his mother and her lover and became sole ruler, ending any chance of folding Portugal back into a realm with Galicia.
He then turned south against the Moors. A crushing victory at Ourique on 25 July 1139 led his soldiers to acclaim him king, though the famous story of a coronation by the Cortes of Lamego is a seventeenth-century invention. Winning the Battle of Valdevez and the Treaty of Zamora in 1143 forced his cousin Alfonso VII of León to accept Portugal's independence. In 1147, helped by crusaders sailing to the Holy Land, he took Santarém and Lisbon. He married Matilda of Savoy and founded Alcobaça Monastery for the Cistercians of his great-uncle Bernard of Clairvaux.
Diplomacy mattered as much as war. By declaring himself a vassal of the pope alone, he sidestepped León's overlordship, and in 1179 the papal bull Manifestis Probatum recognised him as king of an independent country with the right to conquer Moorish lands. Old age brought setbacks: in 1169, near Badajoz, he was injured in a fall and captured by his son-in-law Ferdinand II of León, and his ransom cost nearly all his Galician gains. He never rode a horse again. He died on 6 December 1185 and was succeeded by his son Sancho I.
Source: Afonso I of Portugal