Afonso was the son of Henry
of Burgundy, Count of Portugal and Teresa of León, the
illegitimate daughter of King Alfonso VI of Castile and
León. He was proclaimed King in July 26, 1139, immediatly
after the Battle of Ourique, and died on December 6, 1185
Afonso became fourteen, the adult age in the 12th century.
He made himself a Knight on his own account in the
Cathedral of Zamora, raised an army, and proceeded to take
control of his lands. Near Guimarães, at the Battle of São
Mamede (1128) he overcame the troops under his mother's
lover and ally Count Fernando Peres de Trava of Galicia,
making her his prisoner and exiling her forever to a
monastery in León.
Afonso then turned his
arms against the everlasting problem of the Moors in the
south. His campaigns were successful and, on July 26,
1139, he obtained an overwhelming victory in the Battle of
Ourique, and straight after was unanimously proclaimed
King of Portugal by his soldiers. This meant that Portugal
was no longer a vassal county of León-Castile, but an
independent kingdom in its own right. Next, he assembled
the first assembly of the estates-general at Lamego, where
he was given the crown from the bishop of Bragança, to
confirm the independence.