Kingdom of Castile (10th – 13th c.)
Castile achieved its independence from the Kingdom of Leon under Fernan Gonzalez, Count of Castile (923-970). Sancho III of Navarre inherited title to the County of Castile in 1026 and left it to his son Fernando I as a kingdom in 1035. Fernando I started a war with Kingdom of Leon shortly after his accession to the throne, defeated Bermudo III of Leon, unified both kingdoms and assumed the title Fernando I of Leon. He divided the Kingdom of Castile-Leon among his sons before his death in 1065: his eldest son Sancho II received Castile, the second and his favorite son Alfonso VI inherited Leon, while the youngest son Garcia gained the Kingdom of Galicia.
Sancho II of Castile turned against his brothers and captured both Leon and Galicia in 1072. However, he was assassinated in the same year and was succeeded by his brother Alfonso VI (1072-1109) who recovered the Kingdom of Leon, captured Galicia and proclaimed himself Emperor of all Spain. Alfonso VI was succeeded by his daughter Urraca (1109-1126). She married Alfonso I of Aragon in 1109 but the royal couple separated already in 1114. Urraca’s reign was marked by incessant warfare with her ex-husband who had seized her lands. She managed to recover most of her lands with help of her son Alfonso VII, King of Galicia who succeeded Urraca after her death in 1226.
Alfonso VII (1126-1157) renewed the supremacy of Kingdom of Castile over other Christian kingdoms of the Iberian Peninsula. He conquered Cordoba and Almeria but his campaigns against the Moors did not bring permanent success and his territorial gains were soon lost. Alfonso VII divided his kingdom between his sons: Sancho III became King of Castile and Fernando II became King of Leon. The division led to the rivalry between both kingdoms which split apart about 1195. However, on the death of Henry I of Castile in 1217 his sister Berenguela renounced her right of succession in favor of her son Fernando III who also succeeded his father Alfonso IX of Leon and permanently reunited the kingdoms of Castile and Leon.