qnli question: In which year was the Kingdom of Castile formed? sentence: It continued under that name[clarification needed] until incorporated into the Kingdom of Castile in 1230, after Ferdinand III became joint king of the two kingdoms.