Spain is located in southwestern Europe and comprises most of the Iberian Peninsula. Its capital is Madrid. Spain is divided into 17 autonomous communities and 50 provinces which are further divided into over 8,000 municipalities. Spain has a total area of 194,897 square miles, with 192,874 square miles being land and 2,023 square miles being water. Its coastline spans over 3,000 miles along the Atlantic and Mediterranean seas. Spain's diverse climate ranges from Mediterranean along the coast to more extreme continental inland, with low rainfall across much of the country except in northern regions.