Original: It was one of the kingdoms that founded the Crown of Castile, and the Kingdom of Spain.
Simplified: It was one of the kingdoms that existed before the Kingdom of Spain.