Spain is divided into 17 autonomous communities and 2 autonomous cities. Autonomous communities are divided into 50 provinces. Provinces are subdivided into comarcas. Comarcas are subdivided into municipalities.