The Kingdom of Castile was one of the medieval kingdoms of the Iberian Peninsula. It began in the 9th century: it was called "County of Castile" and was a vassalage depending from the Kingdom of León. It was one of the kingdoms that existed before the Kingdom of Spain.