Where Is Morocco? Location, Map & Geographic Guide
Country Location Guides

Where Is Morocco? Location, Map & Geographic Guide

Morocco is located in Northwest Africa, at the western tip of the continent where the Atlantic Ocean meets the Mediterranean Sea, separated from Europe by just 14 kilometers across the Strait of Gibraltar. Discover Morocco's exact location, diverse geography, and key facts.

Geography Worlds
June 15, 2025
4 min read

Morocco is located in the northwestern corner of Africa, sitting at roughly 31.79°N latitude and 7.09°W longitude, bordered by the Atlantic Ocean to the west, the Mediterranean Sea to the north, Algeria to the east, and Western Sahara to the south. Just 14 kilometers of water across the Strait of Gibraltar separate it from Spain, making Morocco the African nation closest to Europe. Its capital is Rabat, and the country covers about 446,550 square kilometers.

Where Exactly Is Morocco on the Map?

Morocco lies in both the Northern and Western Hemispheres, occupying the extreme northwest of the African continent in a region known as the Maghreb. It is one of only a handful of countries with coastlines on both the Atlantic Ocean and the Mediterranean Sea. This dual-coast position has shaped Morocco's identity for thousands of years, placing it at a natural crossroads between Africa, Europe, and the Atlantic world.

The country measures roughly 1,100 kilometers from north to south and about 750 kilometers from east to west. From the northern tip near Tangier, the Spanish coast is visible across the Strait of Gibraltar on a clear day. Two Spanish enclaves, Ceuta and Melilla, sit on Morocco's Mediterranean shore, a reminder of how tightly the country is woven into the geography of the western Mediterranean.

Which Countries Border Morocco?

Morocco's land and sea boundaries connect it to several distinct regions:

  • Algeria lies to the east and southeast, sharing a land border of roughly 1,559 kilometers. This border has remained closed since 1994 due to political tensions between the two nations.
  • Western Sahara sits to the south. Morocco controls and claims most of this disputed territory, beyond which lies Mauritania.
  • Spain faces Morocco across the narrow Strait of Gibraltar, only about 14 kilometers wide at its tightest point, and also administers the coastal enclaves of Ceuta and Melilla.

Combined, Morocco's Atlantic and Mediterranean shorelines stretch roughly 2,300 kilometers, giving it one of the longest coastlines in Africa. Because it sits beside the Strait of Gibraltar, a major share of the world's shipping passes right along its northern shore, underscoring why the location has been strategically prized for centuries.

What Is the Landscape Like?

For a country of its size, Morocco packs in remarkable geographic variety. The dominant feature is the Atlas Mountains, which run northeast to southwest in three parallel ranges: the Rif along the Mediterranean coast, the Middle Atlas, and the High Atlas. Mount Toubkal in the High Atlas rises to 4,167 meters, the highest peak in North Africa and a magnet for trekkers.

South and east of these mountains, the land falls away into arid plains, palm oases, and eventually the Sahara Desert. The Saharan zone is famous for its towering dunes, especially Erg Chebbi near Merzouga and Erg Chigaga near M'Hamid. To the west, fertile Atlantic coastal plains support much of the country's agriculture, while the northern Rif Mountains stay surprisingly green and wet. This compression of landscapes means a traveler can stand on snow-covered peaks and reach desert sand dunes within the same day.

What Climate Does Morocco Have?

Morocco's climate shifts dramatically from region to region. Along the coast, a Mediterranean climate brings mild, wet winters around 12 to 17°C and warm, dry summers between 22 and 28°C. The cool Canary Current offshore moderates Atlantic temperatures and can create morning fog near Essaouira and Agadir.

Inland and in the mountains, a more continental pattern takes over, with sharper temperature swings and snow covering the High Atlas peaks from November through May; small ski resorts even operate near Oukaimeden. South of the Atlas, conditions turn increasingly arid until they reach a hot desert climate where summer highs can exceed 50°C and yearly rainfall drops below 100 millimeters. This range of climates within a single country is a large part of what makes Morocco's geography so distinctive. For more detail on the regions, cities, and travel basics, see our morocco country guide.

How Do You Get to Morocco?

Morocco is one of the most accessible countries in Africa, especially from Europe. Its main international gateways are Mohammed V International Airport in Casablanca, Marrakech Menara Airport, and Tangier Ibn Battouta Airport. Budget and full-service carriers link these hubs to dozens of European cities, with flights from Paris, London, or Madrid taking only about two to three hours.

Travelers can also arrive by sea, with frequent ferries crossing from Algeciras in Spain to Tangier or Ceuta in roughly 35 to 90 minutes. Inside the country, the high-speed Al Boraq train connects Tangier and Casablanca, the first high-speed rail line on the African continent, making it easy to move between the Mediterranean north and the Atlantic coast.

Frequently Asked Questions

Is Morocco in Africa or the Middle East?

Morocco is firmly part of Africa, located in the northwestern corner of the continent. While it shares strong cultural, linguistic, and historical ties with the Arab world and is sometimes grouped with the broader Middle East and North Africa region, geographically it sits entirely on African soil.

What continent is Morocco on?

Morocco is on the continent of Africa, specifically in the region known as the Maghreb in northwest Africa, alongside countries such as Algeria and Tunisia.

How far is Morocco from Spain?

At its narrowest point, the Strait of Gibraltar separating Morocco from Spain is only about 14 kilometers wide. This short crossing makes Morocco the African country closest to mainland Europe, and ferries make the trip in well under an hour and a half.

What is the capital of Morocco?

The capital of Morocco is Rabat, located on the Atlantic coast. While the larger city of Casablanca is the country's economic hub, Rabat serves as the political and administrative center and is home to the royal palace and government institutions.