Travel Tips

Countries Near Morocco: Borders, Neighbours and Map (2026)

Countries near Morocco: cover image with the outline of the Kingdom of Morocco

The countries near Morocco fall into two circles. On land, Morocco borders Algeria to the east and Mauritania to the south, plus a very short boundary with Spain around Sebta and Melilia on the Mediterranean coast. Across the water, Spain is only 14 km away at the Strait of Gibraltar, Portugal is a short flight north, and Spain’s Canary Islands sit about 100 km off the Saharan coast. This guide shows them on a map of Morocco from Tangier to Lagouira and explains which borders you can actually cross.

Short answer

Land neighbours: Algeria (east), Mauritania (south) and Spain (Sebta and Melilia). Closest country: Spain, 14 km across the Strait of Gibraltar. Other nearby countries: Portugal, Gibraltar (UK), and further away Tunisia, Mali and Senegal. Morocco is the only African country with coastlines on both the Atlantic Ocean and the Mediterranean Sea.

Map of Morocco from Tangier to Lagouira with its neighbouring countries Spain, Portugal, Algeria and Mauritania
Morocco and its neighbours. Click the map to enlarge it.

Morocco’s land borders

Morocco shares land borders with three countries. Lengths below are rounded, because published figures vary slightly from one source to another.

NeighbourDirectionApprox. lengthCan you cross?
AlgeriaEast and south-eastAbout 1,900 to 2,000 kmNo. The land border has been closed since 1994.
MauritaniaSouthAbout 1,560 kmYes, mainly at El Guerguerat, south of Dakhla.
SpainNorth (Mediterranean coast)About 8 km at Sebta and 10.5 km at MeliliaYes, at the crossings of Bab Sebta and Beni Ansar.

Algeria

Algeria is Morocco’s longest neighbour, running from the Mediterranean near Saïdia down through the high plateaus of the Oriental region and into the Sahara. The two countries share history, cuisine and family ties across the border, but the land frontier has been closed since 1994. Algeria cut diplomatic relations in August 2021 and closed its airspace to Moroccan aircraft a few weeks later, so there are no direct flights either. Travellers who want to visit both countries go through a third country, usually Spain, France or Tunisia.

Mauritania

To the south, the Moroccan Sahara borders Mauritania. The main road crossing is El Guerguerat (Al Karkarat), on the national road that runs from Tangier all the way down the Atlantic coast through Laayoune and Dakhla. It is the main overland gateway between Morocco and West Africa, used daily by trucks carrying fruit and vegetables to Nouadhibou, Nouakchott and beyond. If you plan to drive through, check Mauritania’s entry rules for your nationality before you leave, and read our guide to driving in Morocco.

Spain at Sebta and Melilia

The shortest land boundary is with Spain, around Sebta (Ceuta) and Melilia (Melilla), two cities on Morocco’s Mediterranean coast that are administered by Spain. Morocco regards both cities as Moroccan territory. Pedestrian and car crossings exist at Bab Sebta near Fnideq and at Beni Ansar near Nador, but most travellers between the two countries simply take a ferry.

Neighbours across the sea

Morocco’s position at the meeting point of the Atlantic and the Mediterranean puts several countries within an hour or two of its shores. Morocco has about 3,500 km of coastline according to Moroccan official figures.

  • Mainland Spain: the Strait of Gibraltar is about 14 km wide at its narrowest point. Fast ferries link Tangier and Tarifa in roughly one hour, and Tanger Med and Algeciras in about 90 minutes.
  • Gibraltar (United Kingdom): the British territory sits on the European side of the strait, visible from the Moroccan coast on clear days.
  • The Canary Islands (Spain): Fuerteventura lies about 100 km off the coast of Tarfaya. Flights connect the islands with Laayoune, Dakhla, Agadir and Marrakech.
  • Portugal: no border, but Lisbon is about 1h30 by plane from Casablanca, and Faro and Lisbon have direct flights to Marrakech and Tangier.
View across the Strait of Gibraltar from the Moroccan coast near Tangier, with the coast of Spain on the horizon
From the hills around Tangier, the Spanish coast is clearly visible on a clear day.

Other countries in the region

Morocco belongs to the Maghreb, the western part of North Africa, together with Algeria, Tunisia, Libya and Mauritania. It is also the hinge between Europe and West Africa, which explains why Casablanca’s airport works as a hub for flights to Dakar, Abidjan, Bamako and many other African capitals.

Typical direct flight times give a good sense of how close or far each region really is:

From Morocco toTypical direct flight
Madrid, Seville, MalagaAbout 1h to 2h
LisbonAbout 1h30
ParisAbout 3h
LondonAbout 3h15 to 3h40
Dakar (Senegal)About 3h
TunisAbout 2h30
CairoAbout 5h
DubaiAbout 7h30 to 8h
New YorkAbout 7h (Casablanca)

Times are approximate scheduled flight durations and change with routes, seasons and winds.

Is Morocco in the Middle East?

No. Morocco is in North Africa, at the far north-western corner of the continent. It is part of the Arab world and a member of the Arab League, which is why it is often grouped with Middle Eastern countries in the “MENA” label used by banks and international organisations. Geographically, though, Rabat is much closer to Paris than to Cairo, and Morocco is also an active member of the African Union.

Getting to Morocco from its neighbours

  1. From Spain: by ferry (Tarifa, Algeciras, Almeria, Motril, Malaga) or by plane from almost every Spanish airport. Read our guide to the ferry from Spain to Morocco.
  2. From Portugal: by plane to Casablanca, Marrakech, Tangier or Agadir; there is no direct passenger ferry.
  3. From Mauritania: by road through El Guerguerat, or by air from Nouakchott to Casablanca.
  4. From Algeria: only through a third country, since both the land border and direct flights are closed.

Before you book, check whether you need a visa in our guide to Morocco visa rules for 2026.

Frequently asked questions

What country is closest to Morocco?

Spain. Only about 14 km of sea separate the two coasts at the Strait of Gibraltar, and Spain also administers Sebta and Melilia on Morocco’s Mediterranean coast.

Can you see Spain from Morocco?

Yes. On a clear day, the mountains of Andalusia are easy to see from Tangier, Cape Spartel, Ksar Sghir and the road to Fnideq.

Which countries share a border with Morocco?

Algeria, Mauritania and Spain. The border with Algeria is closed; the crossings with Mauritania (El Guerguerat) and Spain (Bab Sebta, Beni Ansar) are open.

Is Morocco part of Europe?

No. Morocco is an African country, but it is very close to Europe and has strong economic ties with the European Union, its largest trading partner.

How far is Morocco from Egypt?

Far: the whole width of North Africa lies between them. A direct flight from Casablanca to Cairo takes about five hours.

Sources

  1. Department of Maritime Fisheries, Kingdom of Morocco: Moroccan coastline of about 3,500 km (mapm.gov.ma).
  2. Natural Earth, public-domain base map data used to draw the map, with the Kingdom of Morocco shown in full.
  3. Tanger Med Port Authority and port operators’ published crossing times, 2026.
  4. Airline schedules for direct routes from Moroccan airports, checked November 2026.

Last checked: 12 November 2026. The map shows the Kingdom of Morocco in its full territory, from Tangier to Lagouira.

Leave a comment