 Under Isabella and Ferdinand, the royal dynasties of Castile and Aragon, their respective kingdoms, were united into a single line.Historiography of Spain generally treats this as the formation of the Kingdom of Spain, but in actuality, the two kingdoms continued for many centuries with their own separate institutions.It wasn't until the Nueva Planta decrees of the early 18th century that the two lands were formally merged into a single state.