Map of Morocco and its neighboring countries
Morocco borders three countries: Algeria, Mauritania and Spain. Morocco's land borders total 2,189 mi (3,524 km), the 58th longest of the 157 countries with land borders.
Morocco's land borders are the 24th longest of the 48 countries of Africa with land borders.
Morocco land borders: total length, rankings and longest border
| Total length | 2,189 mi (3,524 km) |
|---|---|
| Neighboring countries | 3 |
| World rank by total length | 58/157 |
| Rank in Africa | 24/48 |
| Rank, lower-middle income | 20/42 |
| Longest border |
|
Morocco neighboring countries and border lengths
| Neighboring country | Border length, mi | Share of the total | |
|---|---|---|---|
|
|
1,206 | 55.1% | vs Algeria |
|
|
972 | 44.4% | |
|
|
11.5 | 0.53% | vs Spain |
The border with Algeria is the longest, 1,206 mi (1,941 km), 55.1% of the total; the shortest, with Spain, is 11.5 mi (18.5 km).
Morocco and its neighbors: total length of land borders
Of Morocco and its three neighbors, Algeria has the longest land borders in total, 4,184 mi (6,734 km), and Spain the shortest, 1,213 mi (1,953 km). Morocco is third of the four, with 2,189 mi (3,524 km).
Compare the land borders of Morocco with other countries
Sources:
- Central Intelligence Agency (CIA) (2025, updated October 2026)
Creative Commons Attribution (CC BY): you may copy, share, adapt and reuse this content, also commercially, as long as you credit statistics.wiki and note any changes you made. The sources listed above may have their own license terms.