In the nineteenth century, Catalonia was severely affected by the Napoleonic and Carlist Wars.
In the later Middle Ages, Catalan literature flourished.Between 14, the king of Aragon and the queen of Castile married and ruled their kingdoms together, retaining all their distinct institutions, courts (parliament), and constitutions.As wealth from the industrial expansion grew, Catalonia saw a cultural renaissance coupled with incipient nationalism while several workers movements appeared.In 1914, the four Catalan provinces formed a commonwealth, and with the return of democracy during the Second Spanish Republic (1931–1939), the Generalitat of Catalonia was restored as an autonomous government.Under the terms of the Treaty of the Pyrenees in 1659, which ended the wider Franco-Spanish War, the Spanish Crown ceded the northern parts of Catalonia, mostly incorporated in the county of Roussillon, to France.
During the War of the Spanish Succession (1701–1714), the Crown of Aragon sided against the Bourbon Philip V of Spain, whose subsequent victory led to the Nueva Planta decrees which abolished non-Castilian institutions in the Crown of Aragon, replaced Latin and other languages (such as Catalan) with Spanish in legal documents, abolished internal borders and customs except for the Basque and Navarrese territories and ended the Castilian monopoly over trade with the Spanish Empire.
During the Franco-Spanish War (1635–1659), Catalonia revolted (1640–1652) against a large and burdensome presence of the royal army in its territory, becoming a republic under French protection.
Within a brief period France took full control of Catalonia, at a high economic cost for Catalonia, until it was largely reconquered by the Spanish army.
In pre-Roman times, the area that is now called Catalonia in the north-east of Iberian Peninsula – like the rest of the Mediterranean side of the peninsula – was populated by the Iberians.
The Iberians of this area – the Ilergetes, Indigetes and Lacetani (Cerretains) – also maintained relations with the peoples of the Mediterranean.
Since the Spanish transition to democracy (1975–1982), Catalonia has regained considerable local autonomy in political, educational, environmental, and cultural affairs and is now one of the most economically dynamic communities of Spain.