Where Is Morocco Located? A Traveler’s Geographic Guide to the Kingdom
Morocco is in the northwestern corner of Africa, sitting at the literal crossroads of two continents, two oceans, and three distinct cultures. Separated
The closest African country to the European continent is Morocco, located just 14 kilometers (8.7 miles) from mainland Europe across the Strait of Gibraltar.
To appreciate Morocco is to understand why it is such an extraordinary destination. Within a single kingdom, you can explore rugged Atlantic and Mediterranean coastlines, trek across three massive mountain ranges, and sleep beneath the stars in the Sahara Desert all within a three-hour flight from London or a 90-minute flight from Lisbon.
Whether you are planning an overland expedition or just trying to wrap your head around its unique map placement, this guide delivers the accurate, quotable geographic facts your travel planning needs.
Where is Morocco at a Glance?
Morocco sits at a literal geographical crossroads. Within a single kingdom, you can transition from Mediterranean beaches to alpine peaks and deep desert sands—all reachable in under 4 hours by flight from major European hubs.
Where Is Morocco Located on the World Map?
Morocco is positioned on the westernmost edge of North Africa and the Arab world, spanning latitudes 27°N to 36°N and longitudes 1°W to 13°W. This places the country firmly in the Northern Hemisphere. In Arabic, Morocco is officially called Al-Maghrib, which translates to “the place where the sun sets,” a historic reference to its position at the absolute edge of the classical Eastern Hemisphere.
Its unique coordinates trace a landscape that moves from a sun-drenched coastline into dramatic alpine elevations and sweeping desert dunes.
Morocco is the northwesternmost country in Africa, spanning from the Mediterranean Sea and Atlantic Ocean in the north and west respectively, across large mountainous areas in the interior, to the Sahara Desert in the far south.
What Continent Is Morocco In?
Morocco is unambiguously located on the African continent. Specifically, it anchors North Africa in a sub-region known as the Maghreb, which includes Algeria, Tunisia, Libya, and Mauritania.
Because of its close proximity to Europe and its deeply ingrained Islamic roots, Morocco’s geographic classification is occasionally misunderstood by travelers. Here is a clarification of the most common misconceptions:
1) Morocco is NOT in the Middle East: While Morocco is an Arabic-speaking nation and a member of the Arab League, it is geographically and culturally distinct from the Middle East. It shares no land borders with the region and sits more than 4,000 kilometers west of the Suez Canal.
2) Morocco is NOT in Europe: Despite its heavy European architectural, linguistic, and historical influences, Morocco belongs strictly to Africa. This is recognized by the United Nations and the African Union, which Morocco officially rejoined in 2017.
3) Morocco is a Dual-Ocean African Nation: It is the only country on the continent to boast full, functional coastlines along both the Atlantic Ocean to the west and the Mediterranean Sea to the north, giving it unparalleled maritime and climatic diversity.
Is Morocco in Africa or the Middle East?
Morocco is definitely in Africa, not the Middle East. The confusion arises because Morocco is Arabic-speaking, predominantly Muslim, and a member of the Arab League all characteristics shared with Middle Eastern countries. But geography is clear: Morocco’s strategic position places it at the crossroads of Europe and Africa, making it a vital point for trade and cultural exchange throughout history. The Middle East begins east of the Suez Canal Morocco is over 4,000 km to the west.
Where Is Morocco Located Relative to Other Countries?

The narrow 14 km (8.7 miles) span of the Strait of Gibraltar separating Morocco from mainland Spain.
Morocco has land borders with only two countries, Algeria to the east (1,559 km) and the disputed territory of Western Sahara to the south (444 km). It is also in close proximity to Spain across the Strait of Gibraltar (14 km) and to Portugal across the Atlantic. To the east Morocco shares a long formal border with Algeria, and to the south a border with the territory commonly known as Western Sahara, which Morocco claims and largely administers.
Morocco’s Borders Explained
The Strait of Gibraltar separates Spain from Morocco with an 8.7-mile span of water. This makes Morocco the only African country with a direct, near-walkable proximity to Europe, a geographical fact that has shaped its entire history, culture, trade, and modern tourism.
Spain’s Enclaves: Ceuta and Melilla
Spain maintains two small, Spanish-administered enclaves on the Moroccan coast, Ceuta and Melilla, which represent land border complexities. These are legally and politically part of Spain (and therefore the European Union) despite being physically located on the African continent, surrounded by Moroccan territory. The existence of these enclaves, remnants of the Spanish colonial presence, is a continuing point of diplomatic tension between Morocco and Spain.
Where Is Morocco Located in Africa, and How Big Is It?
Morocco occupies 710,850 square kilometers of northwestern Africa, roughly the same size as the US state of California or slightly larger than France, making it the 57th largest country in the world and the 5th largest in Africa by territory. Morocco is a country in the Maghreb Region of North Africa, where it covers an area of 710,850 sq. km.
Morocco is about the same size as California. To put that in perspective for different readers:
This coastal position gives Morocco more than 3,500 kilometers of shoreline, making it both a Mediterranean and Atlantic country. This combined coastline, longer than the entire US East Coast, is one of Morocco’s most geographically distinctive features.
Morocco Location Map: The Four Geographic Zones
Morocco’s location provides four distinct geographical zones stretching from the north to the south Mediterranean coast, Atlantic plains, Atlas Mountain ranges, and the Saharan Desert that present truly different terrains, climates, and adventures in a single land. Morocco’s geographic diversity is incredible due to its location: coastal plains, the Atlas Mountains that run across the country from southwest to northeast, the Rif Mountains in the north near the Mediterranean, and the Sahara Desert in the south.
Zone 1) The Mediterranean North (Tangier, Chefchaouen, Al Hoceima)
The direct exposure to the North Atlantic Ocean, the proximity to mainland Europe, and the long Rif and Atlas mountains are factors in the rather European-like climate in the northern half of the country.
Morocco’s northern Mediterranean zone feels noticeably closer to Spain than to sub-Saharan Africa, with green hillsides, cooler temperatures, and a landscape that shares more with Andalusia than with the Sahara 800 km to the south.
- Rif Mountains: A mountain chain running parallel to the Mediterranean coast, geologically connected to Spain’s Sierra Nevada range.
- Tangier: The gateway city at the Strait of Gibraltar crossing point, historically a meeting point of European and African civilizations.
- Chefchaouen: The famous blue-washed mountain town, 600 m altitude, founded by Andalusian refugees after 1492.
Zone 2) The Atlantic Plains (Casablanca, Rabat, Agadir)
Morocco’s Atlantic coast runs for over 2,500 km from Tangier in the north to the southern border with Western Sahara, an uninterrupted stretch of beaches, fertile agricultural plains, and port cities that form the country’s economic backbone.
- Casablanca: Morocco’s largest city and commercial capital, with a population of ~4 million, driving the country’s Atlantic-facing economic growth.
- Rabat: The administrative capital, located at the mouth of the Bou Regreg river where it meets the Atlantic.
- Agadir: The main Atlantic beach resort, rebuilt after a 1960 earthquake, is now Morocco’s most beach-tourism-focused city.
Zone 3) The Atlas Mountains (Marrakech, Fes, Ouarzazate)
The Atlas Mountains stretch from the central north to the southwest, expanding to about 1,350 kilometers and forming the dorsal spine of the country. The physical features of Morocco are marked by several prominent geographical formations. The Atlas Mountains extend across the central part of the country, featuring the tallest peak, Toubkal, which rises to 4,167 meters (13,671 feet).
The Atlas Mountains divide Morocco’s mild, fertile north and west from the arid, desert south and east, a geographic wall that has shaped migration patterns, agriculture, and cultural boundaries for thousands of years.
- High Atlas: The dominant central range containing Toubkal (4,167 m), North Africa’s highest peak and a popular trekking destination from Marrakech.
- Tizi n’Tichka Pass (2,260 m): The main road crossing over the High Atlas between Marrakech and the Sahara south the route every desert tour from Marrakech takes.
- Middle Atlas: A more forested, cedar-covered range near Fes and Meknes, home to Barbary macaque monkeys and Morocco’s most important water catchment area.
- Anti-Atlas: The southernmost range, lower and more arid, transitioning toward the Sahara.
Zone 4) The Sahara Desert South (Merzouga, Zagora, Draa Valley)
The Sahara Desert blankets the southeastern region of the country. The Moroccan portion of the desert is the world’s third largest desert, at over 3,600,000 square miles.
Morocco’s southern desert region contains two of Africa’s most extraordinary dune fields: Erg Chebbi near Merzouga (dunes reaching 150 m) and Erg Chigaga near M’Hamid alongside the ancient caravan route valleys of the Draa and Ziz rivers that historically connected Morocco to sub-Saharan Africa.
How Far Is Morocco from Major Countries?
At its closest point, Morocco is only 14 km from Spain, around 500 km from France, 2,400 km from the UK, and 6,500 km from the US East Coast, distances that go some way to explaining why Morocco is one of the most visited destinations from Europe but is still growing in US tourism numbers. At its closest point, Morocco is only 8 kilometers from Spain across the Strait of Gibraltar, between Cape Malabata (Morocco) and Tarifa (Spain). The ferry crossing from Tangier Med port to Algeciras in the south of Spain takes between 35 and 60 minutes. The distance by air from Casablanca to Madrid is about 1,500 km (around 2h 30min flight) and from Marrakech to Madrid it is about 1,300 km
Morocco’s proximity to Europe is its single most important geographic tourism advantage: it is closer to London than most Mediterranean island resorts, closer to Paris than many Eastern European cities, and reachable from virtually any European capital in under 4 hours.
Where Is Morocco’s Capital City Located?
Morocco’s capital city is Rabat, located on the Atlantic coast at the mouth of the Bou Reggah river, approximately 90 km north of Casablanca and 340 km north of Marrakech. Many visitors are surprised to learn that the capital is not Casablanca (the largest city) or Marrakech (the most visited). Rabat has served as Morocco’s administrative and royal capital since 1912.
What Is Morocco’s Climate Like Across Its Different Locations?
Its climate varies enormously by zone: Mediterranean along the northern coast, oceanic along the Atlantic, continental and alpine through the Atlas Mountains, and arid desert across the south and southeast. The geographical diversity of Morocco causes drastic changes in climate. The Mediterranean climate characterizes the coastal areas with mild wet winters and hot dry summers. The interior regions, however, can have large temperature differences between day and night. The Sahara region has an arid climate with high temperatures and very little rain.
Morocco has been called “a cold country with a hot sun.” The mild, semi-tropical northern and western coastal areas are separated by mountain ranges from the desert areas to the east and south. Most people live west of the mountain ranges, which protect them from the hot winds of the Sahara Desert.
Why Does Morocco’s Location Make It Such an Extraordinary Travel Destination?

Satellite projection showing Morocco’s massive coastal territory stretching alongside the Atlantic and Mediterranean.
Morocco’s geographic location is the single biggest reason it offers more diversity per square kilometer than almost any other country in the world. You can ski the High Atlas, surf the Atlantic, explore a Roman ruin, walk a medieval medina, and sleep in a Sahara desert camp within the same 10-day trip. Based on our operational experience running desert tours across Morocco year-round, we have seen travelers experience four completely different climates, three mountain ranges, two oceans, and one of the world’s great deserts all without leaving a single country.
Where is Morocco located, which means for travelers specifically:
- Two coastlines: The Mediterranean north for calm, warm swimming; the Atlantic west for world-class surfing, wild beaches, and the coastal culture of Essaouira and Agadir.
- A natural alpine zone: The High Atlas Mountains, with peaks above 4,000 meters and snow from November to April, sitting just 1 hour from the desert gateway city of Marrakech.
- The Sahara within reach: Most tourists assume Africa’s great desert is days away from Europe in Morocco; you cross the Atlas Mountains on day one and sleep in the dunes on day two.
- Unmatched accessibility from Europe: No other Saharan country offers a 2-hour flight from London or a 60-minute ferry from Spain.
- Three thousand years of crossroads history: Morocco controls one of the most important maritime routes in the world: the Strait of Gibraltar, the narrow passage connecting the Atlantic Ocean to the Mediterranean Sea and separating Europe from Africa. This strategic location made Morocco historically important for trade, military routes, and cultural exchange between civilizations such as the Phoenicians, Romans, Arabs, and Europeans. That history is visible in every medina wall, every Roman ruin, and every Andalusian-influenced riad courtyard you walk through.
- Four climate zones in one country: Mediterranean coast, oceanic Atlantic, alpine High Atlas, and Saharan desert a range that would normally require crossing several international borders, compressed into a single nation smaller than France.
Where Is Morocco Located Relative to the Sahara Desert?
Morocco sits on the northern edge of the Sahara Desert, and the Atlas Mountains form a natural barrier between the fertile Mediterranean and Atlantic zones and the desert south. The iconic Erg Chebbi dunes near Merzouga are approximately 560 km southeast of Marrakech. That is why a Morocco desert tour involves a full day of driving over the Atlas Mountains before reaching the dunes, not a logistical inconvenience but one of the most dramatic overland transitions on earth.
Morocco’s relationship with the Sahara:
- Morocco contains two of Africa’s most significant dune fields: Erg Chebbi (Merzouga, dunes to 150 m) and Erg Chigaga (near M’Hamid, Morocco’s largest erg at ~40 km long)
- The Draa Valley, Morocco’s longest river valley, historically served as the main caravan route linking the Saharan interior to Marrakech’s markets
- The ancient city of Ouarzazate (nicknamed “Ouallywood” for its film industry) sits at the transition point between the Atlas Mountains and the pre-Saharan south, 200 km from Marrakech
- The Ziz Valley palm oasis near Erfoud was historically the southern terminus of trans-Saharan trade
Morocco’s Official Facts: Quick Reference for Travelers
Official name: Kingdom of Morocco Population: 38.8 million (2026) Capital: Rabat Languages: Arabic and Tamazight (Berber) are official; French is widely used in business and education; Spanish is also spoken in the northern regions bordering Spain. These facts help to put Morocco’s geography in full national context.
Morocco is officially the Kingdom of Morocco, a country in the Maghreb region of North Africa. Its capital is Rabat, while its largest city is Casablanca. The population of Morocco in 2026 is 38,780,367 persons. The GDP of Morocco in 2026 is approximately $173 billion USD.
Frequently Asked Questions: Where Is Morocco Located?
Where is Morocco exactly?
Morocco is located in northwestern Africa, between 27°N and 36°N latitude, bordered by the Atlantic Ocean to the west, the Mediterranean Sea to the north, Algeria to the east, and the disputed territory of Western Sahara to the south. Its closest point to Europe is just 14 km from Spain across the Strait of Gibraltar.
What continent is Morocco in?
Morocco is in Africa, specifically in the Maghreb sub-region of North Africa. Despite being only 14 km from Spain and sharing cultural and linguistic ties with the Arab world, Morocco is geographically and politically an African nation, a member of the African Union since 2017.
Is Morocco in Africa or the Middle East?
Morocco is in Africa, not the Middle East. The confusion arises because Morocco is Arabic-speaking and predominantly Muslim, but its geography places it firmly in North Africa. Morocco shares no land border with any Middle Eastern country and is over 4,000 km west of the Middle East proper.
What countries border Morocco?
Morocco shares land borders with Algeria (1,559 km, east) and Western Sahara (444 km, south). Spain maintains two sovereign enclaves on Morocco’s northern coast: Ceuta (6.3 km border) and Melilla (9.6 km border). Morocco has maritime proximity to Spain (14 km across the Strait of Gibraltar) and Portugal across the Atlantic.
How far is Morocco from Spain?
Morocco is just 8.7 miles, which is the correct standard geographic figure for the narrowest point of the Strait, though Cape Malabata to Tarifa is about 14.5km. The ferry crossing from Tangier to Algeciras takes 60–90 minutes. A flight from Madrid to Marrakech takes approximately 2 hours 15 minutes.
Is Morocco closed to Europe?
Yes, it is the closest African country to Europe. At just 8.7 miles from Spain, Morocco is geographically closer to the European continent than many European island destinations are to their mainland countries.
What is Morocco’s capital city?
Rabat is Morocco’s capital city, located on the Atlantic coast. Casablanca is the largest city. Marrakech is the most visited tourist city and the main gateway to the Atlas Mountains and Sahara Desert tours.
What ocean is Morocco on?
Morocco has coastlines on both the Atlantic Ocean (western coast, over 2,500 km) and the Mediterranean Sea (northern coast, approximately 500 km) — making it the only country in Africa with dual-ocean coastal access.
Is Marrakech in Africa?
Yes. Marrakech is located in west-central Morocco, approximately 470 km south of the Strait of Gibraltar, at the foot of the High Atlas Mountains. It is Africa’s most visited city by international tourists and the main departure point for Sahara Desert tours to Merzouga and Zagora.
Plan Your Morocco Trip from Here
Now that you know exactly where is Morocco located a country at the literal crossroads of Africa and Europe, where the Atlantic meets the Mediterranean, where the Sahara begins just south of snow-capped mountains the next step is planning your route through it.
At Over Morocco Tours, we run private and small-group tours from Marrakech into the Atlas Mountains and Sahara Desert year-round, designed specifically for international travelers who want more than a surface-level visit.
Our most popular starting point for first-time visitors:
- 3 Day Desert Tour from Marrakech to Merzouga crossing the Tizi n’Tichka pass, visiting the UNESCO kasbah of Ait Ben Haddou, sleeping in the Erg Chebbi dunes
- 7 Day Morocco itinerary: Marrakech, Atlas, Sahara, Fes, returning through the Draa Valley
- Private custom tours built around your dates, group size, and the specific Morocco you want to see
Read our related guide of Where is Morocco:
Browse Our Desert Tours → Contact Us to Plan Your Trip
Based in Merzouga and Marrakech. Running tours since 2012. All vehicles, guides, and permits are included with no hidden fees.

