Urraca was first married with her mother's kinsman the Galician magnate Nuño Meléndez son of Melendo Núñez and María Fróilaz. Around 1182, she became the mistress of king Fernando after the death of his second wife, Teresa Fernández de Traba. They were married a few years later in May 1187 and the king gave her several properties in Aguilar and Monteagudo. Aware that her husband was nearing the end of his life, she attempted to have their only surviving son, Sancho, declared heir to the throne against the interests of Alfonso, later crowned as Alfonso IX of León, son of King Fernando and his first wife Urraca of Portugal. She argued that infante Alfonso was illegitimate since his parent's marriage had been annulled due to their consanguinity. King Fernando apparently banished his son Sancho from the court, considered a triumph for Urraca. King Fernando died in Benavente on 22 January 1188 and was succeeded by his first-born, Alfonso IX of León after which, Urraca had to seek refuge in the Castile ruled by her former husband's nephew, Alfonso VIII, entrusting the protection of her holdings in León to her brother Diego López II de Haro. Nevertheless, Alfonso IX of León, concerned about the power of the Haro family, reached an agreement with King Alfonso VIII of Castile and attacked the fortresses owned by Urraca in the Kingdom of León. In 1213, count Álvaro Núñez de Lara, married to Queen Urraca's niece, Urraca Díaz de Haro gave her several properties in La Bureba, with which she later founded, in 1222, the Monastery of Santa María la Real in Vileña, entrusting its governance to the Cistercians. Although she was not the abbess of this monastery, she became a nun and was buried in a sepulcher made of stone placed in the presbytery of the church at the monastery that was transferred subsequently to the Museum in Vileña after the monastery was destroyed by fire in 1970 and then again to the Museum of Burgos. Queen Urraca has been mistakenly identified as the abbess at the monastery of Cañas. Nevertheless, as demonstrated in contemporary sources, it was her niece, Urraca Díaz de Haro who was actually the abbess at that monastery.
Urraca in contemporary sources
Urraca appears frequently in Medieval sources:
In August 1183, King Fernando II donated land in Villamor, Burón, and Omaña to Urraca.
On 1 July 1190, Alfonso VIII of Castile gave Urraca the towns de Vileña, La Vid de Bureba, and Villaprovedo, plus royal properties in Besga and in Pedralada.
On 2 February 1194, queen Urraca confirmed to the Monastery of San Salvador de Oña its ownership of the hills of Piedralada granted a year earlier to the Monastery by Alfonso VIII of Castile stating that she was doing it pro amore de domno Didaco meo fratre. This donation was confirmed by her son Sancho and by her brother Diego.
In 1195, Queen Urraca with her children Sancho and María Núñez made a donation of land in Mahude.
On 15 April 1222, as the widow of Fernando II, for her soul and that of her children, she donated all her properties in Vileña and in another twelve localities to the nuns at the Abbey of Santa María la Real de Las Huelgas, incorporating these properties to her previous donation for the founding of the monastery in Vileña where Elvira García would be the first abbess.
On 10 May 1224, Pope Honorius III issued a document addressed to Queen Urraca "already a nun in this monastery" and to the religious community, taking it and the vassals of La Vid and Villaprovedo under his protection. This is the last time that she is mentioned at this monastery.
Marriages and issue
She had a daughter with her first husband, Nuño Meléndez:
María Núñez who appears with her mother and her half-brother Sancho in 1195 making a donation to the Monastery of Santa María de Trianos. Although she was not the abbess, María was the temporary administrator of the monastery in Vileña founded by her mother.
Sancho, Infante of León, who inherited Monteagudo and Aguilar from his mother, married in 1210 Teresa Díaz de Haro, daughter of Diego López II de Haro, Lord of Biscay and Toda Pérez de Azagra.
Burial
Queen Urraca was buried, dressed as a nun with her hands folded across her chest, in a stone sepulchre which was previously at the Monastery of Santa María la Real in Vileña, Burgos, that she had founded and is now in ruins. Her sarcophagus, currently at the Museo del Retablo in Burgos, bears the following inscription at her feet: DOÑA hURRACA hYJA DeL CONDE DON LOPE DÍAZ / MVGER DEL REY DON FERNANDO DE LEON.