In a document from the same month as his marriage, Ramiro declares that he "took a wife not out of carnal lust, but for the restoration of the blood and the lineage" ("uxorem quoque non carnis libidine, set sanguinis ac proienici restauratione duxi"). Later medieval and early modern historians, embarrassed by the disregard for canon law, invented explanations to reconcile the marriage of a bishop with what was current in their own day. The fourteenth-century "Chronicle of San Juan de la Peña" records that messengers were sent to the pope to obtain the proper dispensation. The Aragonese translation of the same chronicle places Ramiro's religious status in doubt ("some chronicles say that he was not in holy orders", "algunas cronónicas dizen que no era en sacres órdenes"). At the Second Lateran Council in 1139, the church, perhaps influenced by the case of Ramiro and Agnes, declared the marriages of clerics to be null and void. Prior to this, they were legitimate, but illegal, marriages.