Barcelona is the second largest city in Spain in terms of population. It is the capital of the autonomous community of Catalonia.