Barcelona is the capital city of the autonomous community of Catalonia in the Kingdom of Spain, as well as the country's second most populous municipality, with a population of 1.6 million within city limits. Founded as a Roman city, in the Middle Ages Barcelona became the capital of the County of Barcelona.