The recorded history of the lands of what today is known as Catalonia begins with the development of the Iberian peoples while several Greek colonies were established on the coast before the Roman conquest. It was the first area of Hispania conquered by the Romans. It then came under Visigothic rule after the collapse of the western part of the Roman Empire. In 718, the area was occupied by the Umayyad Caliphate and became a part of Muslim ruled al-Andalus. The Frankish Empire conquered northern half of the area from the Muslims, ending with the conquest of Barcelona in 801, as part of the creation of a larger buffer zone of Christian counties against Islamic rule historiographically known as the Marca Hispanica. In the 10th century the County of Barcelona became progressively independent from Frankish rule.
In 1137, Ramon Berenguer IV, Count of Barcelona betrothed the heiress of the Kingdom of Aragon, Petronilla, establishing the dynastic union of the County of Barcelona with Aragon, resulting in a composite monarchy later known as Crown of Aragon, while the County of Barcelona and the other Catalan counties merged into a state, the Principality of Catalonia, which developed an institutional system (Catalan Courts, constitutions, Generalitat) that limited the power of the kings. Catalonia sponsored and contributed to the expansion of the Crown's trade and military, most significantly their navy. The Catalan language flourished and expanded as more territories were added to the Crown of Aragon, including Valencia, the Balearic Islands, Sardinia, Sicily, Naples, and Athens. The Crisis of the Late Middle Ages, the end of the reign of House of Barcelona, serf and urban conflicts and a civil war (1462–1472) weakened the role of the Principality within the Crown and internationally.