Castile (Spanish: Castilla) was a former kingdom on the Iberian penisnula which formed the larger part of the Kingdom of Spain after the uniting of the royal thrones of Castile and Aragon. The name Castile is thought derive from "land of castles" in reference to the many castles that were built during the Christian reconquest of Iberia from the Moors.
Castile was originally a county in the eastern part of the kingdom of León and gained independence in the 11th century. A period of expansion saw it merge with its neighbours and eventually reunited with León in 1230. El Cid was a notable Castilian military commander who oversaw many defeats of the Moors.
The marriage of Ferdinand II of Aragon and Isabella of Castile in 1469 united the crowns of Castile and Aragon and lead to the formal creation of Spain as a single country when their grandson Charles V assumed both thrones in 1516. At this time the Moors were confined to part of Andalucia in the south-east of the Iberian peninsula around Granada.
The language of Castile became known as Spanish but is still referred to as Castilian to differentiate it from the dialects of Latin America and Catalan in north-eastern Spain.