Barcelona is located in northwestern Spain, along the Mediterranean.