truce. Originally, the archbishop and Fernán had been on good terms. At the time of the Galician revolt (1116) he was acting as Diego's constable (municeps). In 1121, however, he had constructed a fortress at Raneta south of Santiago, a position threatening to the apostolic see. The archbishop promptly had it destroyed.He may have been incited by the queen, who was trying to separate Diego from the Trabas to prevent an alliance of regional powers in Galicia from defying the crown. Fernán also mediated between his elder brother Bermudo and the archbishop in 1121, resulting in Diego bestowing gifts on the Vermudo in return for the fortress of Faro, which he claimed belonged to the diocese. In 1134 the dispute with Diego flared up once more after Fernán imprisoned one of his knights and the archdeacon of Nendos, Pedro Crescónez, whose jurisdiction covered large parts of the Traba patrimony. During the reign of Queen Urraca, Fernán's family was generally allied with her son, the young Alfonso Raimúndez, who had been raised for a time alongside Fernán in the household of Pedro Fróilaz. The Trabas, allied with Diego, tried to make Alfonso king in Galicia in opposition to his mother. With the death of queen Urraca in 1126 and the accession of Alfonso, Fernán became the leading figure in Galicia and used the opportunity to increase his power throughout the kingdom. Together with Teresa he signed a truce with the new king (shortly after March 1126) at Ricobayo near Zamora. In 1149 Alfonso entrusted to him the mentoring of his second son, the future Ferdinand II. Long after Fernán's own death, in 1178, his daughter Teresa married Ferdinand II as his second wife and her second husband. According to the Chronica latina regum Castellae and the De rebus Hispaniae, Fernán's influence was so decisive during the reign of Alfonso VII, that by the king's testament Galicia and León were separated from the kingdoms of Castile and Toledo. The anonymous Chronica claims that Fernán and Manrique Pérez de Lara "aimed to sow the seed of discord" when they proposed the division of Alfonso VII's "empire". De facto ruler of Portugal (1121–1128) In 1116 Fernán participated in a Galician revolt against Queen Urraca. The revolt was led by his father on behalf of Teresa, the widow of Henry of Burgundy, Count of Portugal. The victories in battle at Vilasobroso and Lanhoso sealed the