Oeste and Lanzada, they were all soon released and Diego went over to the separatists. In 1111, Diego crowned Alfonso Raimúndez King of Galicia in opposition to Urraca and her husband. Late in 1113, when the royal court was in Galicia, Arias was inciting Urraca against Diego. Urraca deprived him of his secular authority at the request of the people, who agitated for communal rights, but she reinstated him in his temporal powers within a year and even exempted him from all military service to the crown and extended his charge over the whole diocese. In 1120, Pope Callixtus II elevated Diego and his see to archiepiscopal rank and appointed him papal legate to Spain. That same year, according to the Historia, Urraca ordered the leading men () of Galicia, including Arias Pérez, to do homage () to Diego Gelmírez as "their lord, their patron, their king and their prince, saving their fealty to the queen" and recognise his rule (). In 1121, however, after Diego had renewed his alliance with the Pedro Fróilaz de Traba, his power appeared to threaten that of the queen. In the summer of 1121 she had Diego arrested at Castrelo in collaboration with Arias Pérez. Diego was imprisoned for a while, but the support of the people, which he had been cultivating, compelled his release. Sometime in 1121 Munio Peláez built an "adulterine" (i.e. illegal) castle on the river Iso near Compostela. The Historia Compostelana calls it a "den of robbers and bandits", and Diego managed to raze it to the ground soon after it was built. In the spring of 1126, shortly after Urraca's death and the accession of Alfonso, Arias led a rebellion in Galicia. Diego Gelmírez and Gómez Núñez of Toroño or perhaps Gutierre Vermúdez were charged ("by letter") with putting it down. Diego besieged Arias in Lobeiro and, with siege engines, in Tabeirós, forcing him to surrender. Diego's opinion of Arias was such that he said to him: "I fear, therefore, that if such that you are you leave this world, you will lose eternal life and incur the perpetual condemnation of your soul." Notes Sources Biggs, Anselm Gordon. Diego Xelmírez. Xerais, 1983. Reilly, Bernard F. The Kingdom of León-Castilla under Queen Urraca. Reilly, Bernard F. "The Historia Compostelana: The Genesis and Composition of a Twelfth-Century Spanish Gesta," in Speculum 44 (1969): pp 78–85 Vones, Ludwig, Die 'Historia Compostelana und