The Caselo de Guimarães was constructed in the late 10th century on the foundations of a Roman structure as a defense for the curate of a nearby monastery founded by Mumadona Dias, widow of Hermenigildo Gonçalves, count of Portucale. At the end of the eleventh century, the castle was expanded and became the residence of Count Henry and Countess Teresa de León [Conde Henrique de Borgonha and Condessa Teresa de Leão], father and mother of Afonso Henriques. It became the official royal residence from 1139 after Portugal became independent from the Kingdon of León. It is the purported birthplace of Afonso Henriques, possibly in 1111. The Battle of São Mamede on June 24, 1128, when the young Afonso Henriques defeated the armies of his mother, the widowed Countess-Queen Teresa, and her companion, Fernão Peres de Trava, is considered the originating event of the independence of Portugal from the overlordship of Galicia, itself a county of León. Following the battle, Afonso Henriques styled himself Prince of Portugal. The battle is commemorated annually on the Castle grounds.
![A bronze image of Afonso Henriques embedded in the wall of the Castelo de Guimarães.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Castelo-AH-image-1-scaled.jpeg)
![Castelo de Guimarães historical marker.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimarães-Castle-marker-scaled.jpeg)
![Castelo de Guimarães.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimarães-Castle-scaled.jpeg)
![Igreja de São Miguel historical marker.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimarães-Church-marker-scaled.jpeg)
![Statue of Afonso Henriques, from the same mold as the statues in Lisbon and Santarém, at the approach to the greenway leading to the Castelo de Guimarães.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimaraes-Statue-scaled.jpeg)
![The Romanesque Igreja de São Miguel, near the Castelo de Guimarães, purported site of the baptism of Afonso Henriques.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimaraes-Church-scaled.jpeg)
![Baptismal font inside the Igreja de São Miguel.](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimarães-baptismal-font-scaled.jpeg)
![Baptismal font marker: 'Nesta pia foi bavtizado el rey dom Affonso Henriques pelo arcebispo S. Geraldo no anno do Senhor 1106.' [In this font was baptized king Afonso Henriques by the archbishop S[ão] Geraldo in the year of our Lord 1106.]](https://afonsohenriques.academic.wlu.edu/files/2022/07/Guimarães-baptismal-font-marker-1-scaled.jpeg)