Spain is located in southwestern Europe, occupying most of the Iberian Peninsula, with the Atlantic Ocean to its north and west and the Mediterranean Sea to its south and east. Its capital, Madrid, sits almost exactly in the geographic center of the country. Spain covers roughly 505,992 km², making it the second-largest nation in the European Union after France, and it shares the Iberian Peninsula with its western neighbor, Portugal.
Where Exactly Is Spain on the Map?
Spain lies in the Northern and Western Hemispheres, stretching between roughly 36 and 44 degrees north latitude. To pinpoint it on a world map, look at the far southwestern corner of Europe, where the continent narrows and reaches down toward Africa. Only the Strait of Gibraltar, about 14 km wide at its narrowest point, separates mainland Spain from Morocco and the African continent.
The country anchors the western Mediterranean and faces the open Atlantic at the same time, a dual coastline that has shaped its maritime history for centuries. This crossroads location made Spain a launching point for transatlantic exploration and a long-standing bridge between Europe and North Africa.
Countries That Border Spain
Spain shares land borders with several countries and microstates, each defining a different stretch of its frontier:
- Portugal — to the west, sharing the longest uninterrupted border in the European Union, running about 1,200 km.
- France — to the northeast, separated by the high wall of the Pyrenees mountains.
- Andorra — a tiny landlocked principality tucked into the Pyrenees between Spain and France.
- Morocco — bordering Spain's two autonomous North African cities, Ceuta and Melilla, which sit on the African mainland.
- United Kingdom — through Gibraltar, a British Overseas Territory on Spain's southern tip.
This mix of neighbors gives Spain the unusual distinction of holding territory on two continents, with Ceuta and Melilla physically located in Africa while the bulk of the country sits firmly in Europe.
Mainland, Islands, and Territories
Spain is far more than its peninsular landmass. Its territory includes two major archipelagos and several outposts:
- The Balearic Islands — including Mallorca, Menorca, Ibiza, and Formentera — lie in the Mediterranean Sea east of the mainland.
- The Canary Islands — a volcanic chain in the Atlantic Ocean off the northwest coast of Africa, far closer to Morocco than to Madrid.
- Ceuta and Melilla — autonomous cities on the North African coast bordering Morocco.
Because the Canary Islands sit so far south, Spain spans a wide range of latitudes and climates, from the green, rainy Atlantic north to the subtropical, sun-baked islands near the Tropic of Cancer.
The Lay of the Land
Geographically, much of Spain is defined by the Meseta Central, a vast elevated plateau averaging around 600 meters above sea level that covers the heart of the country and gives Spain one of the highest average elevations in Europe. This plateau is rimmed and crossed by mountain ranges, including the Pyrenees along the French border, the Sierra Nevada in the south, and the Cantabrian Mountains in the north. Mainland Spain's highest peak, Mulhacén, rises to about 3,479 meters in the Sierra Nevada, while Mount Teide in the Canary Islands climbs even higher at 3,718 meters.
Mainland Spain has roughly 5,000 km of coastline divided between the Atlantic and the Mediterranean. The contrast is striking: the northern Atlantic coast is cool, lush, and often misty, while the southern and eastern Mediterranean shores — the famed Costa del Sol and Costa Brava — are warm, dry, and sunny for much of the year. Major rivers such as the Ebro, Tagus, Guadalquivir, and Duero carve the landscape and drain toward both seas.
Why Spain's Location Matters
Spain's position at the meeting point of Europe and Africa, and between the Atlantic and the Mediterranean, has made it a strategic hub for trade, migration, and culture for thousands of years. The narrow Strait of Gibraltar remains one of the world's busiest shipping lanes, linking the enclosed Mediterranean to the open ocean.
Today that same geography fuels Spain's role as one of the most visited countries on Earth, with varied climate zones, beaches, and mountains all within a single nation. Spanish is the official language, the euro is the currency, and the country is a parliamentary constitutional monarchy of around 47 million people. To dig deeper into its regions, cities, and travel highlights, see our full spain country guide.
Frequently Asked Questions
What continent is Spain in?
Spain is located on the continent of Europe, in the region of southwestern Europe. However, its autonomous cities of Ceuta and Melilla, along with the Canary Islands, sit geographically in or near Africa, giving Spain a footprint on two continents.
What is the capital of Spain?
The capital of Spain is Madrid, located near the geographic center of the country on the Meseta Central plateau. It is both the political capital and the largest city in Spain.
Is Spain part of the Iberian Peninsula?
Yes. Spain occupies roughly 80 percent of the Iberian Peninsula, sharing it with Portugal to the west and the microstate of Andorra in the Pyrenees. The peninsula is bordered by the Atlantic Ocean, the Mediterranean Sea, and the Bay of Biscay.
How far is Spain from Africa?
At its closest, mainland Spain lies only about 14 km from Morocco across the Strait of Gibraltar, making Africa visible from the southern Spanish coast on a clear day.
