The municipalities of Spain (Spanish: municipios, IPA: [muniˈθipjos]; sing. municipio) are the basic level of Spanish local government. Each municipality forms part of a province which in turn forms part or the whole of an autonomous community (17 in total plus Ceuta and Melilla): some autonomous communities have additional second level subdivisions, such as comarcas (districts) or mancomunidades (commonwealths). There is a total of 8,112 municipalities in Spain, including the autonomous cities of Ceuta and Melilla. The average population of a municipality is about 5,300, but this figure masks a huge range: the most populous Spanish municipality is the city of Madrid, with a population of 3,255,944 (2009) , while several rural municipalities have fewer than ten inhabitants (Villarroya, La Rioja, had a population of 10 in 2009). The area of the municipal territory (Spanish: término municipal) usually ranges 2-40 km², but municipalities such as Tremp (Lleida) cover more than 400 km².
Catalonia (English //, //; Catalan: Catalunya [kətəˈɫuɲə] or [kataˈluɲa]; Spanish: Cataluña [kataˈluɲa]; Occitan: Catalonha [kataˈluɲɔ]) is an autonomous community of Spain, with the official status of a nationality. Catalonia comprises four provinces: Barcelona, Girona, Lleida, and Tarragona. Its capital and largest city is Barcelona, the second largest city in Spain after Madrid, and the center of one of the largest metropolitan areas in Europe. Catalonia covers an area of 32,114 km² and has an official population of 7,535,251.