The County of Barcelona was founded in the 10th century after the collapse of Charlemagne's empire. In 1137 the Counts became Kings of Aragon, a kingdom which included modern-day Catalonia and Roussillon. The many feudal castles in western Languedoc bear witness to the rivalry between the kings of France and Aragon, and their need to defend the frontier.
James I King of Aragon and count of Barcelona (reigned from 1213 to 1276)
The kingdom of Aragon in eastern Spain was the most urbanized of the three powers that held the Iberian peninsula. Affected by the same civil unrest of the rest of Spain during the late Middle Ages, peace finally began to take root when Isabella of Castile and Ferdinand of Aragon married in 1469 and inherited their thrones in 1474 and 1479 respectively. Their development of an efficient central adminstration transformed the two monarchies into the kingdom of Spain.