where is morocco
Destinations

Where Is Morocco Located?

By Hassan SaharaVia September 7, 2026 6 min read

Where is Morocco is one of the first questions people ask once they start planning a trip, and the short answer is: in the far northwest corner of Africa, just across the water from Spain. Morocco sits at a genuine crossroads, close enough to Europe for a short flight or even a ferry ride, yet home to the Sahara desert, snow-capped mountains, and centuries-old medinas. In this guide we break down exactly where Morocco is on the map, what it borders, and why its location makes it such an easy country to fall in love with.

Morocco on the World Map

Morocco lies in North Africa, in the region historically known as the Maghreb, alongside Algeria, Tunisia, Libya, and Mauritania. The country spans roughly between 27°N and 36°N latitude and 1°W and 13°W longitude, placing it firmly in the Northern and Western Hemispheres. In Arabic, Morocco is called Al Maghrib, meaning “the place where the sun sets” or “the West,” a name that reflects its position at the western edge of the historic Islamic world. For a deeper geographic breakdown, see Geography of Morocco, which covers the country’s terrain, climate zones, and natural features in detail.

What Morocco Borders

Morocco’s borders are shaped by both water and land:

  • Atlantic Ocean: forms the entire western coastline of the country
  • Mediterranean Sea: borders Morocco to the north
  • Algeria: shares a long land border to the east, though it has remained officially closed since 1994
  • Western Sahara: lies to the south; Morocco administers this territory, though its international status remains disputed and it is recognized by the United Nations as a non-self-governing territory
  • Spain: connected both by the narrow Strait of Gibraltar to the north and by land through two small Spanish-administered enclaves, Ceuta and Melilla, on Morocco’s own Mediterranean coast

This mix of maritime and land borders is part of what makes Morocco’s location so distinctive. It is the only African country with coastlines on both the Atlantic Ocean and the Mediterranean Sea at the same time.

How Close Is Morocco to Europe?

Morocco is, quite literally, the closest African country to Europe. At its narrowest point, the Strait of Gibraltar separates Morocco from Spain by only about 14 kilometers, or roughly 8.7 miles. On a clear day, it’s genuinely possible to see the coast of Spain from certain points along Morocco’s northern shore, and ferries cross the strait in about an hour, connecting cities like Tangier directly to Tarifa or Algeciras in Spain. This proximity has shaped much of Morocco’s history, from Andalusian architectural influence to a steady flow of trade and migration across the water for centuries.

Two Coastlines, One Country

Few countries in the world can claim direct access to two different bodies of water quite like Morocco can. The Atlantic coast runs from the north near Tangier all the way down past Agadir and beyond, home to surf towns like Taghazout and historic ports like Essaouira. The Mediterranean coast, shorter but equally striking, stretches from the Strait of Gibraltar eastward past cities like Tétouan and Al Hoceïma toward the Algerian border. This dual coastline gives Morocco a genuinely unusual range of coastal climates and landscapes within a relatively compact stretch of shoreline.

Is Morocco in Africa or the Middle East?

This is one of the most common points of confusion for first-time visitors, so it’s worth addressing directly: Morocco is entirely and unambiguously part of the African continent. It shares no land border with any Middle Eastern country, being separated from that region by Algeria, Libya, and Egypt to the east. The confusion often comes from Morocco’s Arabic-speaking, majority-Muslim culture, which many people mentally associate with the Middle East, but geographically and politically Morocco has always belonged to North Africa. It’s also a member of the African Union, further underlining its African identity on the international stage.

Morocco’s Capital and Major Cities

Another frequent surprise: Morocco’s capital is Rabat, not Casablanca. Casablanca is the country’s largest city and its main economic and business hub, which leads many people to assume it holds the political capital status too, but the seat of government and the royal palace are both in Rabat, further up the Atlantic coast. Other major cities worth knowing on the map include Marrakech and Fez inland, Tangier at the northern tip near the Strait of Gibraltar, and Agadir along the southern Atlantic coast.

Morocco’s Geography at a Glance

FeatureDetail
Continent / RegionAfrica, North Africa (Maghreb)
CapitalRabat
Largest cityCasablanca
CoastlinesAtlantic Ocean and Mediterranean Sea
Distance to SpainAbout 14 km (8.7 miles) at the Strait of Gibraltar
Highest pointJbel Toubkal, 4,167 m
Neighboring countries/territoriesAlgeria (east), Western Sahara (south), Spain (via Ceuta, Melilla, and maritime border)

From Coast to Desert: Morocco’s Varied Regions

Part of what makes Morocco’s location so appealing to travelers is just how much geographic variety is packed into one country. Moving inland from either coastline, you’ll hit the Rif Mountains in the north, the Middle and High Atlas ranges running diagonally through the center of the country, and eventually the pre-Sahara and true Sahara desert landscapes in the south and east, near towns like Merzouga and Zagora. It’s entirely possible to go surfing on the Atlantic coast in the morning and be standing on a sand dune in the Sahara a few days later, all without leaving Moroccan territory.

Why Morocco’s Location Matters for Visitors

Morocco’s position just south of Europe is a big part of why it has become such a popular short-haul destination. Direct flights from major European cities typically take three hours or less, and for travelers coming from Spain, a ferry across the Strait of Gibraltar is a genuinely viable option. Once you’re there, the country’s compact size relative to its geographic diversity means it’s realistic to combine imperial cities, mountains, desert, and coast into a single, well-paced itinerary, something far harder to pull off in most other countries this varied.

Frequently Asked Questions

Is Morocco in Africa or the Middle East? Africa. It shares no land border with any Middle Eastern country, being separated from that region by Algeria, Libya, and Egypt.

What is the capital of Morocco? Rabat, not Casablanca, which is the largest city but not the political capital.

How close is Morocco to Spain? At its narrowest point, the Strait of Gibraltar separates the two countries by only about 14 kilometers.

Conclusion

So, where is Morocco? Firmly in the northwest corner of Africa, bordered by the Atlantic Ocean and the Mediterranean Sea, separated from Europe by just a narrow strip of water at the Strait of Gibraltar, and bordering Algeria and Western Sahara on its landward sides. That location, at the meeting point of Africa, Europe, and the wider Arab world, is a big part of why Morocco offers such a rich mix of landscapes and cultural influences within a single trip, and why it remains one of the most accessible and rewarding destinations for travelers heading to Africa for the first time.

Share this article

Ready to see Morocco with a local guide?

Browse our tours, or message us your dates and we'll help you pick the right route.