Catalonia is an autonomous community of Spain, designated a "nationality" by its Statute of Autonomy. Catalonia comprises four provinces: Barcelona, Girona, Lleida, and Tarragona. The capital and largest city is Barcelona, the second largest city in Spain, and the centre of one of the largest metropolitan areas in Europe, and it comprises most of the territory of the former Principality of Catalonia, with the remainder now part of France. Catalonia is bordered by France and Andorra to the north, the Mediterranean Sea to the east, and the Spanish regions of Aragon and the Valencian Community to west and south respectively. The official languages are Catalan, Spanish and Aranese (an Occitan dialect).
In the 10th century the eastern counties of the March of Gothia and the March of Hispania became independent from the Frankish kingdom, uniting as vassals of Barcelona. In 1137 Barcelona and Aragon formed the Crown of Aragon, and Catalonia became the base of Aragonese maritime power in the Mediterranean. Medieval Catalan literature flourished. Between 1469 and 1516, the King of Aragon and the Queen of Castille married and ruled together their kingdoms, retaining all their distinct institutions, Courts, Constitution. During the Reapers' War (1640–52), Catalonia rebelled against the presence of Castillian army in its territory, becoming a republic under French protection. Under the terms of the Treaty of the Pyrenees in 1659, which ended the wider Franco-Castillian war, Castille agreed with France to cede it the northern parts of Catalonia, mostly incorporated in the county of Roussillon. During the War of the Spanish Succession (1701–14), the Crown of Aragon sided against Philip V of Spain, whose subsequent victory led to the abolition of Catalan institutions and the imposition of the Castillian ones, and the Spanish language in public life.
Despite the repression and the Napoleonic and Carlist Wars, Catalonia experienced economic growth and industrialization. During the second half of the 19th century, the region saw a cultural renaissance coupled with incipient nationalism, while several workers movements appeared. In 1913, the four Catalan provinces formed a Commonwealth, and with the advent of democracy during the Second Spanish Republic (1931–39), the Generalitat of Catalonia, was restored. After the Spanish Civil War, the Francoist dictatorship enacted repressive measures, abolishing Catalan institutions and banning the Catalan language again. During the 1950s and 1960s, Catalonia saw significant economic growth and became an important tourist destination, drawing many workers from across Spain and making Barcelona one of Europe's largest industrial metropolitan areas. Since the Spanish transition to democracy (1975–82) Catalonia has recovered political and cultural autonomy and is now one of the most economically dynamic regions of Spain. The Catalan government has announced its intention to hold a referendum on possible independence from Spain in 2014.