to stop her son Afonso from overthrowing her, Teresa 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. Sole count In 1128, near Guimarães at the Battle of São Mamede, Afonso and his supporters overcame troops under both his mother and her lover, Count Fernando Peres de Trava of Galicia. Afonso exiled his mother to Galicia, and took over rule of the County of Portucale. Thus the possibility of re-incorporating Portucale into a Kingdom of Portugal and Galicia as before was eliminated and Afonso became sole ruler following demands for greater independence from the county's church and nobles. The battle was mostly ignored by the Leonese suzerain who was occupied at the time with a revolt in Castille. He was also, most likely, waiting for the reaction of the Galician families. After Teresa's death in 1131, Afonso VII of León and Castille proceeded to demand vassalage from his cousin. On 6 April 1129, Afonso Henriques dictated the writ in which he proclaimed himself Prince of Portugal or Prince of the Portuguese, an act informally allowed by Afonso VII, as it was thought to be Afonso Henriques's right by blood, as one of two grandsons of the Emperor of Hispania. Afonso then turned his arms against the persistent problem of the Moors in the south. His campaigns were successful and, on 25 July 1139, he obtained an overwhelming victory in the Battle of Ourique, and straight after was (possibly unanimously) proclaimed King of the Portuguese by his soldiers, establishing his equality in rank to the other realms of the Peninsula, although the first reference to his royal title dates from 1140. The first assembly of the Portuguese Cortes convened at Lamego (wherein he would have been given the crown from the Archbishop of Braga, to confirm his independence) is a 17th-century embellishment of Portuguese history. Kingship Complete independence from Alfonso VII of León's suzerainty, however, could not be achieved by military means alone. The County of Portugal still had to be acknowledged diplomatically by the neighboring lands as a kingdom