Morocco is a country located in North Africa with coastlines along the Atlantic Ocean and the Mediterranean Sea. It’s a popular tourist destination known for its culture, beaches, and exotic landscapes. But where exactly is Morocco located on the map?

Morocco’s Geographic Location

Morocco is situated in the Maghreb region of North Africa. It borders the North Atlantic Ocean to the west and Algeria to the east and southeast. Morocco also shares land borders with Western Sahara to the south and Spain to the north across the Strait of Gibraltar.

The geographic coordinates of Morocco are 32°N 6°W. Morocco covers an area of 446,550 square kilometers (172,410 square miles), making it slightly larger than the state of California.

Bordering the Mediterranean and Atlantic

A unique aspect of Morocco’s location is that it has coastlines on both the Mediterranean Sea and the Atlantic Ocean. Morocco has a Mediterranean coastline that stretches 500 miles from the Strait of Gibraltar to the border with Algeria. Major port cities along the Mediterranean coast include Tangier and Casablanca.

Morocco’s Atlantic coastline extends for over 1,000 miles down to the disputed territory of Western Sahara. Prominent Atlantic coastal cities include Rabat, Agadir, and Essaouira. The waters around Morocco’s coast are very productive for fisheries.

Proximity to Europe

Morocco sits only about 9 miles from Europe across the Strait of Gibraltar. At its narrowest point, the strait is just 7.7 miles wide from Morocco to the Spanish territory of Ceuta on the other side. The proximity to Spain and Europe has influenced Morocco’s history and culture over the centuries.

Spain has two autonomous cities, Ceuta and Melilla, on the Mediterranean coast that are Spanish exclaves surrounded by Morocco’s territory. Morocco has disputed control over these two areas.

Location Within Africa

Zooming out the map view, Morocco sits in the far northwestern corner of the African continent. To Morocco’s direct south is the vast expanse of the Sahara Desert stretching across North Africa. Algeria borders Morocco to the east and southeast within the Maghreb region.

Morocco is only about 9 miles from mainland Europe but over 3,000 miles from the southernmost point of Africa in South Africa. This gives a sense of just how large the African continent is with Morocco tucked away in one corner.

Morocco as a Gateway

Due to its proximity to Europe and its coastlines on two major bodies of water, Morocco has long served as an important trade hub and gateway to Africa. Goods and culture have flowed between sub-Saharan Africa, Europe, and Morocco for centuries.

In the 15th and 16th centuries, the Portuguese and Spanish used Morocco’s coastal ports as crucial stopping points for exploring the African coast for resources and trade routes to Asia. The influences of native Berber, Arab, European, and sub-Saharan cultures have blended to form Morocco’s unique identity today.

Distinct Regions Within Morocco

Though the country only covers 172,000 square miles, Morocco contains geographic diversity across distinct regions including:

The Rif Mountains

In the north along the Mediterranean coast, the Rif Mountains extend from Ceuta west to Melilla. This rugged mountain range contains Morocco’s cannabis cultivation region and reaches an altitude of 8,058 feet at Mount Tidirhine. The Rif Mountains historically hindered rulers from controlling the rebellious Berber tribes of the region.

The Atlas Mountains

The most prominent geographical feature of Morocco is the Atlas Mountain range that stretches diagonally across Morocco for over 1,000 miles. The High Atlas mountains run down the center of the country, with altitudes over 13,000 feet. The Middle and Anti-Atlas ranges span along the country’s southern half.

The Coastal Plains

Between the Rif and Atlas Mountains to the north and south are the fertile Moroccan coastal plains. Major population centers like Casablanca, Rabat, and Tangier are located along the coastal plains adjacent to the Atlantic and Mediterranean. This is the most populated part of Morocco.

The Sahara Desert

The Sahara Desert extends into parts of southern and eastern Morocco, comprising the driest region. Morocco contains only a small section of the vast 3.5 million sq mile Sahara that dominates North Africa. The Moroccan Sahara offers incredible dunes and oases.

Morocco’s Strategic Position

Morocco’s geographic location at the corner of Africa and Europe has given it advantages as well as risks across its history. Some key aspects of its strategic position include:

  • Access to major trade routes by sea and land. Morocco has benefited from trade and cultural exchange via its proximity to Europe and sub-Saharan Africa.
  • Susceptibility to foreign invasion. Its coastal location has left Morocco vulnerable to invasions by European powers and conquests throughout history from the Phoenicians to the French.
  • Migration and smuggling route to Europe. Its proximity to Spain has made Morocco both a transit point for illegal migration to Europe and a partner in border control efforts.
  • Terrorism and drug trafficking risks. Its porous borders and proximity to areas of conflict have exposed Morocco to risks of extremism, drug trade, and human trafficking.
  • Important political and economic alliances. Morocco has leveraged its geography to forge strategic partnerships with major players like the U.S., EU, and Gulf states.

So in summary, Morocco’s unique location in Africa’s northwestern corner has been a mixed blessing. But overall, Morocco has managed to skillfully use its position to grow into one of Africa’s most stable and developed nations.


Morocco is strategically situated in North Africa with the Mediterranean Sea to its north, the Atlantic Ocean to its west, and the Sahara Desert to its south and east. Its proximity to Europe across the narrow Strait of Gibraltar shaped its history as a crucial trade and cultural crossroads.

Within its borders, Morocco contains stunning geographical diversity from rugged mountain ranges to lush coastal plains to desert landscapes. Morocco’s diverse people and cultures have been influenced by native Berber tribes, Arab conquerors, and European powers throughout its history.

So while it only occupies a small fraction of the vast continent of Africa, Morocco holds an outsized importance due to its strategic location at the corner of Africa and Europe. Morocco stands today as a model of stability and economic progress in the region and a key gateway between Europe, Africa, and the Middle East.

FAQs About the Location of Morocco

What continent is Morocco located on?

Morocco is located on the continent of Africa. It sits in the northwestern corner of Africa just south of Europe across the Mediterranean Sea.

What major bodies of water border Morocco?

The Atlantic Ocean borders Morocco to the west, while the Mediterranean Sea sits to the north. Morocco has coastlines on both major bodies of water.

How close is Morocco to mainland Europe?

At its closest point, Morocco lies just 9 miles from the Spanish territory of Ceuta across the Strait of Gibraltar. The proximity to Europe has influenced Morocco through trade, conquests, and exchange of culture.

What are Morocco’s neighboring countries?

Morocco shares land borders with Western Sahara to the south, Algeria to the east and southeast, and Spain across tiny outposts like Ceuta and Melilla to the north. No other country directly borders Morocco.

What geographic features are within Morocco?

Morocco contains the Rif Mountains, the High Atlas Mountains spanning diagonally, coastal plains along the ocean coasts, and part of the vast Sahara Desert extending to the south and east.