Morocco is in Africa. It occupies the north-western corner of the continent, in the region known as the Maghreb, and the Strait of Gibraltar, 14.2 km wide at its narrowest, separates it from Spain and mainland Europe. No mainstream definition puts any of Morocco's own territory in Europe: the UN Statistics Division lists it under Northern Africa, it belongs to the African Union, and when it applied to join the European Community in 1987 the application was turned down because Morocco was not considered a European country. The confusion is easy to understand, though. Spain holds two cities, Ceuta and Melilla, on the Moroccan coast, which makes Morocco the only African country with a land border with the European Union.
The Strait of Gibraltar: 14.2 km Between Two Continents
The Strait of Gibraltar connects the Atlantic Ocean to the Mediterranean Sea, and by convention its waters are where Europe ends and Africa begins. At the narrowest point the two shores are 7.7 nautical miles, or 14.2 km, apart. On the northern side are Spain and the British overseas territory of Gibraltar; on the southern side are Morocco and the Spanish city of Ceuta. The strait is between 300 and 900 metres deep, and ferries cross it in as little as 35 minutes.
The line is geological as well as conventional. The African and Eurasian plates meet in this area, and the Atlantic segment of their boundary to the west is a zone of faulting that geologists call the Azores–Gibraltar Fault Zone. About 5.97 million years ago the old seaways between the Atlantic and the Mediterranean closed completely, and the Mediterranean's salinity soared in what is called the Messinian salinity crisis. Today the shallowest part of the crossing is the Camarinal Sill, about 280 metres down, at the strait's far western end.
The names in Arabic reflect Morocco's position. The strait has been called Bāb al-Maghrib, "Gate of the West", and Morocco's own Arabic name, al-Maghrib, means "the west" or "the land of the sunset". Medieval Muslim geographers described the area from Tiaret to the Atlantic as al-Maghrib al-Aqṣā, the Farthest West of the Islamic world: a name drawn from Morocco's place at the western end of North Africa, not at the southern end of Europe. Spain has studied a fixed link since 1972, through a state company, SECEGSA, that has existed since 1981. The proposed rail tunnel would run about 65 km, but none has been built, and crossing between the continents still means a ferry or a flight.
Morocco on the Map: From the Rif to the Sahara
Morocco's internationally recognised borders lie between latitudes 27° and 36° north and longitudes 1° and 14° west, enclosing about 446,300 km². The 2024 census counted 36,828,330 people. The capital, Rabat, stands at the mouth of the Bou Regreg river on the Atlantic coast, and the largest city and main port is Casablanca. Other cities with more than 500,000 people at the 2014 census were Fes, Marrakesh, Meknes, Salé and Tangier, the last of which looks straight across the strait towards Spain.
Morocco is one of only three countries, with Spain and France, that have coastlines on both the Atlantic and the Mediterranean. The Rif Mountains run along the Mediterranean shore in the north. The Atlas Mountains form the backbone of the country, running from north-east to south-west, and most Moroccans live north and west of them in the fertile coastal belt. South-east of the Atlas, the land falls away into the Sahara, the desert that most plainly ties Morocco to the rest of the continent.
The highest point, Toubkal, rises to 4,167 m in the High Atlas, 63 km south of Marrakesh and visible from the city. It is the highest peak in Morocco, the Atlas range, North Africa and the Arab world. The climate follows the same split as the relief. The coast and the northern ranges have a hot-summer Mediterranean climate, cooled on the Atlantic side by the Canary Current. East of the Atlas, in the mountains' rain shadow near the Algerian border, the country turns to hot desert.
Ceuta, Melilla and Morocco's Land Border With the EU
The strongest reason people wonder whether Morocco is partly European is that Europe, politically, reaches onto its coast. Spain holds three territories with land borders on the Moroccan mainland. According to Wikipedia's article on the border, they add up to 18.5 km: about 8 km around Ceuta, 10.5 km around Melilla and just 85 metres at Peñón de Vélez de la Gomera, a rock joined to the shore. Spain also holds small islands off the coast, including the Chafarinas and Peñón de Alhucemas, and the Canary Islands lie off Morocco's Atlantic coast.
Ceuta was taken by Portugal in 1415, passed to the Spanish crown in 1580 and stayed Spanish after 1640. Melilla was seized in 1497. Both were ordinary Spanish municipalities until their statutes of autonomy in 1995, and they are now autonomous cities of Spain: Ceuta covers 18.5 km² and lies 17 km across the strait from the province of Cádiz, while Melilla covers 12.3 km² on the eastern side of Cape Three Forks. Because they are part of Spain, the border fences around them, 6 metres high at Ceuta, are described as the only land borders between the European Union and an African country. Morocco does not recognise Spanish sovereignty over either city and claims them. That dispute is about sovereignty, not continents: Ceuta and Melilla are European-governed territory physically located in Africa. Our guide to the Ceuta and Melilla borders covers the crossings in detail.
History adds to the European pull. In 1912 France and Spain established protectorates over Morocco and made Tangier an international zone, and independence came in 1956 under Sultan Mohammed V. French is still taught as an obligatory language in all schools, and France and Spain remain Morocco's main trading partners. In 2030 Morocco is due to co-host the FIFA World Cup with Spain and Portugal, the first edition held in North Africa.
Algeria, Mauritania and the Western Sahara Question
Morocco's other boundaries lie entirely inside Africa. To the east and south-east, the border with Algeria runs 1,559 km from the Mediterranean to the tripoint with Western Sahara. It traces back to the Treaty of Lalla Marnia of 1845 between Morocco and colonial France, and it has been closed to all travel since 1994. Algeria cut diplomatic relations with Morocco in August 2021.
To the south lies Western Sahara, a territory of about 272,000 km² that the United Nations lists as non-self-governing. Spain ruled it as Spanish Sahara until 1975–1976. Morocco claims the territory as its Southern Provinces and controls about 70% of it, including almost all of the coast, behind a 2,700 km sand wall known as the Berm. The Polisario Front, backed by Algeria, controls the rest and proclaimed the Sahrawi Arab Democratic Republic, which is a member of the African Union. A UN-sponsored ceasefire agreed in 1991 held until November 2020, when it broke down and armed clashes resumed, and the referendum planned under the UN's MINURSO mission has not taken place.
That is why the length of Morocco's southern frontier depends on whose map you read. On the internationally recognised map, Morocco's border with Western Sahara is a straight 444 km line from the Atlantic to the Algerian tripoint. In practice, the area Morocco administers runs all the way south to the Mauritanian border at Guerguerat on the coast, so Moroccan-controlled land also touches Mauritania. Either way, every one of those boundaries runs through the Sahara, deep inside the African continent. The full list is in our post on the countries that border Morocco.
From the 1987 EC Bid to the African Union in 2017
Institutions have tested the question directly. Morocco and Turkey both applied to join the European Community in 1987. Morocco's was rejected on the grounds that it was not a European country. Turkey, which had signed an association agreement with the Community in 1963, was not turned away on that ground, because about 3% of its territory lies in Europe. Morocco's ties with the bloc have since been built as a partnership rather than a path to entry. The two signed a commercial agreement as early as 1960 and a first cooperation agreement in 1976. The EU–Morocco Association Agreement of 1 March 2000 is the legal basis for relations today. On 13 October 2008 the EU granted Morocco "advanced status", a relationship officials summed up as "more than association, less than accession". Morocco is also a member of the Union for the Mediterranean, founded in Paris on 13 July 2008, which brings the 27 EU states together with 16 partner countries around the sea.
Morocco's place in African bodies has been more turbulent, but not because of geography. It withdrew from the Organisation of African Unity, the African Union's predecessor, in 1984, two years after that body admitted the Sahrawi Arab Democratic Republic. It stayed outside for more than three decades and rejoined the African Union in 2017. It also belongs to the Arab League and the Arab Maghreb Union, alongside its North African neighbours.
Statistical schemes leave no doubt. The UN Statistics Division's geoscheme places Morocco in Northern Africa, with Algeria, Egypt, Libya, Sudan, Tunisia and Western Sahara. With the African Union, the Arab Maghreb Union and the 1987 rejection all pointing the same way, the answer is African, even with Spain 14.2 km away. For the countries that genuinely do straddle a continental line, such as Turkey, Russia and Egypt, see our list of countries that span two continents.
