Raymond was the fourth son of William I, Count of Burgundy and arrived in the Iberian peninsula probably in 1086 with the army of Odo I, Duke of Burgundy, who besieged the cityTudela, Navarre. In April 1087 the army abandoned the siege and returned home, but Odo, Raymond and Henry of Burgundy went west at the court of Alfonso VI king of Castile and León. There, Odo arranged the marriage of king's first daughter, Urraca, to Raymond on 1087; the couple received the county of Galicia as dowry. In 1093 Alfonso VI married an illegitimate daughter Teresa to Henry and gave them the county of Portugal, which evolved to a kingdom. In 1107 Raymond died, followed the next year by Sancho, the king's only son. Now his presumptive heiress, Urraca was married to Alfonso I of Navarre and Aragón, who was promised the kingdom to the exclusion of Urraca's son by Raymond. The couple proved incompatible, and following Alfonso VI's death in 1109, Urraca reigned as queen while resisting efforts by both her husband and her son by Raymond to take the crown. The latter succeeded on her death, becoming Alfonso VII, first king of Castile and León from the Castilian House of Ivrea.
Alfonso VII partitioned the kingdom to his sons: Sancho III received Castile & Toledo and Ferdinand received León & Galicia. The kingdoms remained divided under their sons Alfonso VIII of Castile and Alfonso IX of León, but in 1197 the latter married the daughter of the former, so following the death of her teenage brother, Henry I of Castile, this kingdom passed to her son by Alfonso IX, Ferdinand III. He permanently reunited the kingdoms on the death of his father and passed them to his own son, Alfonso X. Alfonso X's eldest son Ferdinand died in 1275 leaving two sons, but the king's second son Sancho claimed to be the new heir. The king preferred Ferdinand's sons, but the nobility supported Sancho and a civil war began. The descendants of Ferdinand form the House of la Cerda. Alfonso X died in 1284 and finally his second son succeeded him, as Sancho IV. The grandson of Sancho IV, i.e. Alfonso XI, had legitimate son Peter of Castile and some illegitimate sons: Henry, Fadrique, etc. Henry attacked Peter with a host of soldiers of fortune in 1366. The Castilian Civil War followed: Peter was besieged at the fortress of Montiel. During the negotiations, Peter entered the tent of Henry's envoy, where Henry, which was hidden there, attacked him and killed him. Peter had no legitimate sons, and Henry became the new king as Henry II and was the founder of the House of Trastámara. His brother Fadrique became the founder of the House of Enríquez.