US Trends

which mainland african country has the longest coastline?

Somalia is the mainland African country with the longest coastline.

Quick Scoop: Answer

  • Country: Somalia
  • Region: Horn of Africa, along the Gulf of Aden and the Indian Ocean.
  • Approximate coastline length: About 3,300+ km, often quoted as 3,333 km.
  • Mainland note: Madagascar has the longest coastline in Africa overall, but it is an island state; Somalia holds the record for mainland Africa.

Why this is a bit of a “trick” geography question

When people ask “which mainland African country has the longest coastline?” they’re usually contrasting it with the overall African record, which belongs to Madagascar.

If you strip out islands and look only at the continental landmass, Somalia comes out on top, ahead of South Africa and Mozambique.

In forum-style geography chats, this often shows up as a quiz where the “gotcha” is that Madagascar wins for all of Africa, but Somalia wins for mainland Africa.

Top African coastlines (context)

Here’s a quick look at where Somalia sits among African countries by coastline length:

[5][8][3] [1][7][10][3] [7][8][3][5] [8][3][5][7] [3][5][7]
Rank (Africa) Country Mainland or island Approx. coastline (km)
1 Madagascar Island 4,828 km
2 Somalia Mainland ≈3,333 km
3 South Africa Mainland 2,798 km
4 Mozambique Mainland 2,470 km
5 Egypt Mainland ≈2,234–2,450 km (sources vary)

A tiny coastal storytelling touch

Somalia’s long coast stretches from the Gulf of Aden down the Horn of Africa, wrapping around into the Indian Ocean, so on a map it looks like the entire eastern edge of the continent is “hooked” by one country’s shore.

That sweeping arc is why, once islands are excluded, no other mainland African country can beat Somalia’s coastal length.

TL;DR: The answer to “which mainland African country has the longest coastline?” is Somalia.

Information gathered from public forums or data available on the internet and portrayed here.