Spain or the Kingdom of Spain , is a country located in southwestern Europe on the Iberian Peninsula.Itsmainland is bordered to the south and east by the Mediterranean Sea except for a small land boundary with Gibraltar; to the north by France, Andorra, and the Bay of Biscay; and to the west by the Atlantic Ocean and Portugal. Spanish territory also includes the Balearic Islands in the Mediterranean, the Canary Islands in the Atlantic Ocean off the African coast, and two autonomous cities in North Africa, Ceuta and Melilla, that border Morocco. With an area of 504,030 km², Spain is the second largest country in Western Europe after France.
Because of its location, Spain has been subject to many external influences, often simultaneously, since prehistoric times. At certain times, the country itself has been an important source of influence to other regions. Archaeological and genetic evidence strongly suggests that the Iberian Peninsula acted as one of three major refugia from which northern Europe was repopulated following the end of the last ice age. It was also the seat of of a global empire that has left a legacy of over 400 million Spanish speakers today. The combination of external influences with the interactions of the culturally and politically differentiated regions of the rugged peninsula has produced a dramatic history; typified by alternating periods of unity and disunity, under very different regimes.