Spain is a sovereign state while Catalonia is its autonomous community. The capital of the community of Catalonia is Barcelona.