In 800, Charlemagne's troops wrested parts of today's Catalonia from the Muslims of the Iberian Peninsula and gave birth to the Catalan nation. The Carolingian Empire established the Spanish March, which included the counties of Gerona, Ampurias, Barcelona-Ausona and Urgel-Sardagne.
This beach head of the Carolingian Empire continued to grow and develop its own identity until it eventually became an independent nation late in the 9th Century. Catalonia's great territorial expansion took place during the reign of King Jaime I (1208-1276)who extended Catalan sovereignty to Valencia and Majorca. For this reason, King Jaume I is revered as the creator of the Catalan state. Shortly afterwards Catalonia developed a true maritime empire in the Mediterranean which came to include Naples, Sicily, Sardinia and the Greek counties of Athens and Neopatria.
Following the dynastic union of the kingdoms of Castile and Aragon, Catalonia continued to exist as a state until the reign of King Philip V. The War of the Spanish Succession ended with the defeat of Valencia in 1707, of Catalonia in 1714, and of the last of the islands in 1715.
In the wake of these defeats, the new king abolished the sovereignty and the customary laws and privileges of Catalonia and attempted to impose Castilian language and customs. This situation continued to exist until the creation of the Catalan Commonwealth early in the 20th Century, followed in 1931 by the restoration of the Generalitat (the national Catalan government) and its rebirth in 1977, following the hiatus of the Franco dictatorship.