Morocco is in Africa, occupying the northwestern corner of the continent in the region known as North Africa, or the Maghreb. It sits at the spot where Africa comes closest to Europe, separated from Spain by the narrow Strait of Gibraltar. Despite that closeness to the European mainland, Morocco is firmly an African country, classified by the United Nations as part of Northern Africa and a member of the African Union.
Where Exactly Is Morocco on the African Continent?
Morocco lies at the far northwestern tip of Africa, with its northern shore facing the Mediterranean Sea and its long western shore facing the Atlantic Ocean. This gives it the distinction of being the only African nation with substantial coastline on both bodies of water at once. The capital, Rabat, sits on the Atlantic coast, while the country spans roughly 446,550 square kilometers of mountains, plains, and desert.
Its land borders are short by African standards. Algeria lies to the east and southeast, and the disputed territory of Western Sahara stretches to the south. Spain, by contrast, lies just across the water, and Spain's small enclaves of Ceuta and Melilla are physically attached to Moroccan soil, making Morocco one of the few places where the European Union has a land border on the African continent.
Just How Close Is Morocco to Europe?
The Strait of Gibraltar, which divides Morocco from Spain, is only about 14 kilometers wide at its narrowest point. On a clear day you can stand on the Moroccan coast near Tangier and see the mountains of southern Spain, and the reverse view is equally famous from the Rock of Gibraltar. This narrow channel is where the Mediterranean Sea meets the Atlantic Ocean, and it is one of the busiest shipping lanes in the world.
That proximity has shaped Morocco's history for thousands of years. The strait was a crossing point for Phoenician traders, Roman legions, and the Moorish armies that swept into Spain in the eighth century, founding the Islamic civilization of al-Andalus. Today the same waters carry ferries, cargo ships, and a steady flow of trade and migration between two continents. The closeness is geographic, but Morocco's identity remains African and Arab-Berber at its core.
North Africa and the Maghreb
Within Africa, Morocco belongs to a cultural and geographic grouping called the Maghreb, an Arabic word meaning "the west" or "place of sunset." The Maghreb traditionally includes Morocco, Algeria, Tunisia, Libya, and Mauritania, the western flank of the Arab world. Morocco anchors the far northwestern end of this region.
The country is a member of both the African Union, which it rejoined in 2017 after a long absence, and the Arab League. This dual membership reflects Morocco's blended heritage: it is geographically and politically African, while culturally tied to the wider Arabic-speaking world. The native Amazigh (Berber) population, whose roots in the region predate the Arab arrival, adds a distinct third layer to Morocco's identity.
The Landscape: Mountains, Coast, and Desert
Morocco's terrain is among the most varied in Africa. The Atlas Mountains run diagonally across the country from the southwest to the northeast, rising to Mount Toubkal at 4,167 meters, the highest peak in North Africa. These ranges act as a barrier that separates the fertile, Mediterranean-influenced north and west from the arid lands beyond.
South and east of the Atlas, the landscape gives way to the northern edge of the Sahara Desert, with dunes, oases, and rocky plateaus. Along the Atlantic, Morocco's coastline stretches roughly 1,835 kilometers and receives enough rainfall to support extensive farming. This combination of snow-capped peaks, desert, and ocean coast within a single country is unusual on the continent, and it allows Morocco to grow everything from olives and citrus to dates.
- Continent: Africa (Northern Africa / Maghreb)
- Capital: Rabat
- Area: about 446,550 km²
- Highest point: Mount Toubkal, 4,167 m
- Coastlines: Atlantic Ocean and Mediterranean Sea
For a fuller picture of the country's regions, cities, and culture, see our morocco country guide.
Frequently Asked Questions
Is Morocco in Africa or the Middle East?
Morocco is geographically in Africa, specifically North Africa. It is sometimes grouped with the Middle East under the term "MENA" (Middle East and North Africa) because of its Arabic language and Islamic culture, but it lies entirely on the African continent and is not part of the Middle East in a strict geographic sense.
Is Morocco part of Europe?
No. Although Morocco is only about 14 kilometers from Spain across the Strait of Gibraltar, it is not part of Europe. It is an African country with strong historical and economic ties to Europe, but its land and territory sit firmly on the African continent.
What continent does the Sahara Desert in Morocco belong to?
The portion of the Sahara Desert within Morocco is part of Africa. The Sahara is the largest hot desert on Earth and stretches across much of North Africa, with its northwestern edge reaching into southeastern Morocco beyond the Atlas Mountains.
Which oceans and seas surround Morocco?
Morocco is bordered by the Atlantic Ocean to the west and the Mediterranean Sea to the north. The point where these two meet, the Strait of Gibraltar, marks the country's northern doorway toward Europe.
