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