Aragon in the Middle Ages was the hub of the wider Crown of Aragon. The Crown was represented in the region from 1517 by a viceroy.
In 1479, King Ferdinand II of Aragon married Isabella I of Castile, a kingdom covering much of the rest of modern Spain. However, until the Nueva Planta decrees of 1707, Aragon maintained its own separate laws and institutions.