The Middle Ages
At the start of the 9th century, following the Muslim invasion and the expulsion of the Arabs from the Iberian peninsula by the Franks, the territory of what later became Catalonia was organised into comtats, counties ruled by counts based on the territorial divisions of the Visigothic period. The Comtat de Barcelona (County of Barcelona) was originally established by the ruler of the Carolingian Empire but the break-up of the empire saw Guifré el Pelós (Wilfred the Hairy) set up the Casal de Barcelona (House of Barcelona) as Barcelona was the main county in the Catalan lands and dominated the others.
In the 11th century, Count Ramon Berenguer I proclaimed the Usatges de Barcelona. These rules and customs formed the first Catalan legislative text and sought to solve the legal problems created by the new feudal society. They applied to all of Old Catalonia. With the unification of the various counties in the Catalan lands under the jurisdiction of King Alphonse l in the 12th century, the Principality of Catalonia took shape and, from that moment, the sovereign of the Principality also held the title of Count of Barcelona.
Under the protection of the counts, an agricultural and craft-based Barcelona increased its political and commercial importance and grew rapidly. The ancient Roman walls were now too small, so compact but unprotected urban centres developed round new parishes outside the walls.
Consell de Cent and the Corts Catalanes
During the reign of Jaume I, the Conqueror (1218-76), King of Aragon and Count of Barcelona, government of Barcelona, the Ciutat Comtal, passed into the hands of the Consell de Cent (Council of One Hundred), a new form of municipal government comprising 128 members, that lasted until 1714.
The increase in trade brought lots of merchants to Barcelona and led to the establishment of the Consolat del Mar in 1258. This Maritime Consulate regulated maritime trade and was responsible for the port regulations.
In 1283, during the reign of Pere el Gran (Peter the Great), the first Corts Catalanes were held in Barcelona with the aim of drafting a Catalan constitution or statute, and this gave rise to the Generalitat of Catalonia, the main Catalan governmental institution which had its seat in the Palau de la Generalitat in Plaça Sant Jaume from the beginning of the 15th century.
Political and commercial expansion led to a glorious age that favoured urban development. First, a new wall was built in the 13th century which expanded the city by drawing the Ribera and Sant Pere de les Puel·les neighbourhoods into it on one side, and reaching the Rambla on the other. Then, a century later, work started on expanding the walled area further to include the Raval neighbourhood and stretching as far as today's Avinguda Paral·lel, finally ending next to the sea. A fragment of the wall built in this final expansion has been preserved along with one of the entrance gates, the Portal de Santa Madrona, at the end of today's Paral·lel and next to the Reials Drassanes, the Royal Shipyards, also constructed at this time and housed in a building that symbolises medieval Barcelona's naval power. Work also started on building a port because, despite the busy maritime activity, the city did not have one.
The Romanesque churches were rebuilt and new buildings went up in the splendid Gothic style that are still preserved today, for example, the Shipyards and the Llotja exchange, religious buildings such as the Cathedral and Santa Maria del Mar church, a perfect example of Catalan Gothic, palaces, mansions, convents, monasteries and many others. A construction fever that left behind a magnificent heritage all round the city.