Sancho Garcés III de Pamplona
The Kingdom of León continued to be the most important of all those of the Iberian Peninsula. However, Sancho III of Navarre (1004–1035) took over Castile in the 1020s, and managed León in the last year of his life, leaving Galicia to temporary independence. In the division of lands which followed his death, his son Fernando succeeded to the county of Castile. Two years later, in 1037, he defeated the king of León who died in the battle and, because Fernando was married to the Leónese king's sister, he became king of León and Galicia. For nearly 30 years, until his death in 1065, he ruled over the kingdom of León and the county of Castile as Ferdinand I of León.