Castle country on León’s frontier became Spain’s engine
Castile began as León’s ninth-century eastern march, its “land of castles” name attested by 800 and mirrored in Arabic Al-Qila. Counts clawed autonomy, then kingship, pushing south until Castile and León together formed the Crown that later dominated Spain.
The name is literally about castles. Chronicles of Alfonso III of Asturias record Castilla in a document of 800, and Córdoban writers called the same country Al-Qila, the castled uplands beyond Alava. It was the fortified eastern march of Asturias, in land once called Bardulia, bounded to the south by the Sistema Central just north of modern Madrid. Settlers from Cantabria, Asturias and the Basque coast, along with people of Visigothic and Mozarab background, moved in under leaders such as Abbot Vitulus and his brother Count Herwig, and the region developed its own Romance dialect and customary law.
In 850 Rodrigo became the first count of a broader Castile, fortifying the old hill town of Amaya on a surviving Roman road to León. The county was later carved up among several counts, then reunited in 931 by Fernán González, who rebelled against León and won the right to pass the county to his heirs.
A Navarrese interlude followed. During Count García Sánchez's minority Castile accepted Sancho III of Navarre as overlord, and when García was murdered in 1028 while in León to wed Princess Sancha, Sancho made his own son Ferdinand count and married him to Sancha. Ferdinand then made war on his brother-in-law Vermudo III, who died at Tamarón without heirs. Castile became a separate kingdom in 1065 when Ferdinand I divided his realm: Sancho II took Castile, Alfonso VI León and García Galicia. Sancho, aided by El Cid, drove Alfonso into exile, but was assassinated at the siege of Zamora in 1072, leaving Alfonso to rule all three.
Unions came and went. León and Castile were joined from 1072 to 1157 and permanently after 1230. Alfonso VI's widowed daughter Urraca married Alfonso I of Aragon, a disastrous match he repudiated in 1114, and her son reigned as Alfonso VII. In 1080 the Council of Burgos swapped the Mozarabic liturgy for the Roman rite. Meanwhile Castilian kings conquered widely in the Muslim south, and the combined realms, later with overseas lands, became known as the Crown of Castile.
Source: Kingdom of Castile