In 1069, the betrothal with Agnes, daughter of William VIII, Duke of Aquitaine was signed.
At the time, she was barely 10 years old and so it was necessary to wait until she reached age 14 for the official wedding, which took place in late 1073 or early 1074.
She appears in royal diplomas until 22 May 1077; from that date, the king appears alone in the documentation.

Agnes is said to have died on 6 June 1078, On the other hand, Orderic Vitalis, an English chronicler of the 12th century, said that the marriage of Agnes and Alfonso VI had been annulled in 1080 for reasons of consanguinity, and that Agnes was remarried in 1109 to Elias de la Fleche, Count of Maine.

Reilly suggests that the marriage had been annulled in 1077, probably because of the lack of children.
However, Gambra disagrees and believes that there are no reliable sources to support this assertion.
In addition to being implied by Orderic, the alleged repudiation appears only in a volume of L'art de vérifier les dates and, according to Gambra, "it is impossible, in the absence of better references, to grant credit to the assertion of Agnes' repudiation".
In addition, he indicates that Lucas de Tuy, in his Chronicon mundi, indicates that the Queen was buried in Sahagún.
Finally, he points out that "If such an important event had taken place, it would not make much sense [...] that Alfonso VI immediately married another princess who was a member of Agnes' family".
Agnes and the king's next wife, Constance, were cousins in the third degree, both of them descendants of William III, Duke of Aquitaine.
Salazar y Acha concludes that Orderic is in error, and that it was Beatrice, the last wife of Alfonso VI, who as his widow married the Count of Maine.
In 1069, the betrothal with Agnes, daughter of William VIII, Duke of Aquitaine was signed. At the time, she was barely 10 years old and so it was necessary to wait until she reached age 14 for the official wedding, which took place in late 1073 or early 1074. She appears in royal diplomas until 22 May 1077; from that date, the king appears alone in the documentation. 
Agnes is said to have died on 6 June 1078, On the other hand, Orderic Vitalis, an English chronicler of the 12th century, said that the marriage of Agnes and Alfonso VI had been annulled in 1080 for reasons of consanguinity, and that Agnes was remarried in 1109 to Elias de la Fleche, Count of Maine.
Reilly suggests that the marriage had been annulled in 1077, probably because of the lack of children. However, Gambra disagrees and believes that there are no reliable sources to support this assertion. In addition to being implied by Orderic, the alleged repudiation appears only in a volume of L'art de vérifier les dates and, according to Gambra, "it is impossible, in the absence of better references, to grant credit to the assertion of Agnes' repudiation". In addition, he indicates that Lucas de Tuy, in his Chronicon mundi, indicates that the Queen was buried in Sahagún. Finally, he points out that "If such an important event had taken place, it would not make much sense [...] that Alfonso VI immediately married another princess who was a member of Agnes' family". Agnes and the king's next wife, Constance, were cousins in the third degree, both of them descendants of William III, Duke of Aquitaine. Salazar y Acha concludes that Orderic is in error, and that it was Beatrice, the last wife of Alfonso VI, who as his widow married the Count of Maine.
Alfonso VI of León and Castile