Afonso was the son of
Theresa, the
illegitimate daughter of King
Alfonso VI of León, and her husband,
Henry of Burgundy. He was the youngest of 3 children, with the oldest being
Urraca Henriques and Sancha Henriques being the middle child. Historians have also come to a consesus that a fourth illegitimate child was born from Henry of Burgundy, namely Pedro Afonso, who followed on his half-brother's conquests and later settled as a monk in
Alcobaça Monastery. His place of birth has been highly disputed between scholars and historians, with four distinct possibilities: 1) he was born in
Guimarães, which was an important fortified position in the County of Portugal; 2) he was born in
Viseu, which was an important economic hub for the County; 3) he was born in
Coimbra, an immensely important city where he would later spent the most time in and be buried in; or 4) he was born elsewhere, either
Tierra de Campos,
Sahagún or
Braga. According to the '''' the future Portuguese king was born in
Viseu, which was at the time the most important political centre of his parents. This was accepted by most Portuguese scholars until 1990, when Torquato de Sousa Soares proposed Coimbra, the centre of the county of Coimbra and another political centre of Afonso's progenitors, as his birthplace, which caused outrage in Guimarães and a polemic between this historian and
José Hermano Saraiva. Almeida Fernandes later proposed
Viseu as the birthplace of Afonso based on the '''', which states Afonso was born in 1109, a position followed by historian
José Mattoso in his biography of the king, regardless of this, it is still widely accepted in popular conscience that Afonso was born in
Guimarães. Abel Estefânio has suggested a different date and thesis, proposing 1106 as the birth date and the region of
Tierra de Campos or even
Sahagún as likely birthplaces based on the known itineraries of Henry and Theresa. His place of baptism is also under suspicion: according to tradition the place is indicated as being in the
Church of São Miguel do Castelo, in Guimarães, however, recent scholarship, backed by architectural and arqueological evidence, have casted doubts on this claim. It has been calculated that the date of the consecration of the Church took place in 1239, therefore putting the construction of the church an entire century after his death. There are those who argue that the baptism actually took place in the
Cathedral of Braga where he was baptised by the
Primate Archbishop Saint Gerald of Braga, which was a politically sound move for Count Henry to have the highest-ranking clergy in his fiefdom baptise his heir. Henry and Theresa reigned jointly as count and countess of Portugal until his death on 22 May 1112 during the siege of
Astorga, after which Theresa ruled Portugal as a widow. Both women, Countess Theresa and Queen Urraca, ruled alone after the deaths of their immigrant husbands, ostensibly in defence of their young children, but also in their own right. Theresa would proclaim herself queen (a claim recognised by
Pope Paschal II in 1116) but was captured and forced to reaffirm her
vassalage to her half-sister,
Urraca of León. In an effort to pursue a larger share in the Leonese inheritance, his mother Theresa joined forces with
Fernando Pérez de Trava, the most powerful count in
Galicia. The Portuguese nobility disliked the alliance between Galicia and Portugal and rallied around Afonso. The
Archbishop of Braga,
Maurice Bourdin, was also concerned with the dominance of Galicia, apprehensive of the ecclesiastical pretensions of his new rival the Galician
Archbishop of Santiago de Compostela,
Diego Gelmírez, who had claimed an alleged discovery of relics of
Saint James in his town, as a way to gain power and riches over the other cathedrals in the Iberian Peninsula. In order to stop her son Afonso from overthrowing her, Theresa exiled him when he was twelve in the year 1120. In 1122, Afonso turned fourteen, the adult age in the 12th century. In symmetry with his
cousin, Afonso made himself a
knight on his own account in the
Cathedral of Zamora in 1125. After the military campaign of Alfonso VII against his mother in 1127, Afonso revolted against her and proceeded to take control of the county from its queen. == Path to sole rulership ==