her right as queen regnant and had not learnt chastity in the polygamous household of her father. Husband and wife quarrelled with the brutality of the age and came to open war, even placing Urraca under siege at Astorga in 1112. Alfonso had the support of one section of the nobles who found their account in the confusion. Being a much better soldier than any of his opponents he won the Battle of Candespina and the Battle of Viadangos, but his only trustworthy supporters were his Aragonese, who were not numerous enough to keep Castile and León subjugated. The marriage of Alfonso and Urraca was declared null by the pope, as they were second cousins, in 1110, but he ignored the papal nuncio and clung to his liaison with Urraca until 1114. During his marriage, he had called himself "King and Emperor of Castile, Toledo, Aragón, Pamplona, Sobrarbe, and Ribagorza" in recognition of his rights as Urraca's husband; of his inheritance of the lands of his father, including the kingdom of his great-uncle Gonzalo; and his prerogative to conquer Andalusia from the Muslims. He inserted the title of imperator on the basis that he had three kingdoms under his rule. Alfonso's late marriage and his failure to remarry and produce the essential legitimate heir that should have been a dynastic linchpin of his aggressive territorial policies have been adduced as a lack of interest in women. Ibn al-Athir (1166–1234) describes Alfonso as a tireless soldier who would sleep in his armor without benefit of cover, whom when asked why he did not take his pleasure from one of the captives of Muslim chiefs, responded that the man devoted to war needs the companionship of men not women. Church relations The king quarrelled with the church, and particularly the Cistercians, almost as violently as with his wife. As he defeated her, so he drove Archbishop Bernard into exile and replaced the abbot of Sahagún with his brother. He was finally compelled to give way in Castile and León to his stepson, Alfonso VII of Castile, son of Urraca and her first husband. The intervention of Pope Calixtus II brought about an arrangement between the old man and his young namesake. In 1122 in Belchite, he founded a confraternity of knights to fight against the Almoravids. It was the start of the military orders in Aragon. Years later, he organised a branch