Spain is located in the southwestern part of the continent of Europe. Spain borders Portugal, France, and Andorra. Spain is divided into 17 regions and has a population over 40 million. The capital of Spain is Madrid, which is located near the center of the country. The population of Madrid is nearly 3 million.