Barcelona is the capital of the autonomous community of Catalonia and the second largest city in Spain after Madrid with a population of 1,700 000 intra-muros when five million people live in the whole Barcelona metropolitan area. Barcelona is the largest metropolis on the Mediterranean Sea and the fourth economically powerful city by GDP in the European Union. Widely spoken Catalan and Spanish are both the official languages.