What Is the Capital of Somalia? Mogadishu, a Thousand-Year-Old Indian Ocean Port
Source: Wikimedia Commons
Capital Cities

What Is the Capital of Somalia? Mogadishu, a Thousand-Year-Old Indian Ocean Port

Somalia’s capital is Mogadishu, a port that traded gold and cloth across the Indian Ocean long before Italy made it a colonial capital. Here is the city through its power, faith, trade and daily life.

Geography Worlds
January 15, 2025
8 min read

The capital of Somalia is Mogadishu, called Xamar (Hamar) by its own residents and Muqdisho in Somali. It lies on the Indian Ocean coast of the Horn of Africa, in the Banaadir region, which covers the same ground as the city and is run as a municipality rather than as one of Somalia's federal member states. Demographia put the population at about 2.4 million in 2017, and more recent urban estimates exceed four million, making it by far the largest city in the country. What sets Mogadishu apart is age: it has been a trading port for well over a thousand years, and was once described as the richest city on the East African coast. Four threads run through its story, power, faith, trade and daily life, and each is tied to particular places in the city.

Map marking the location of Mogadishu
Mogadishu, at 2.1°N, 45.4°E, on a Geography Worlds map drawn from Natural Earth boundary data (dashed lines mark disputed boundaries).

Villa Somalia and the Many Rulers of Mogadishu

The seat of power today is Villa Somalia, the official residence and main workplace of the president, on high ground overlooking the ocean with access to both the harbour and the airport. The palace itself dates only from October 1936, when it was inaugurated as Villa del Viceré for the Italian governors, but the city around it has been a capital under many regimes. In the medieval period it was the centre of the Mogadishu Sultanate, which minted its own coins and came under the Ajuran Sultanate in the thirteenth century. In the seventeenth century the city passed to the Hiraab Imamate, and in the nineteenth it fell within the sphere of the Geledi Sultanate, whose Sultan Yusuf Mahamud once marched into the city with an army of 8,000 to settle a quarrel between its two main quarters, Shangani and Hamar Weyne.

In 1905 Italy made the city, which it spelled Mogadiscio, the capital of Italian Somaliland. Italian settlers founded small factories and farms, new avenues went up in the 1930s, a 114-kilometre narrow-gauge railway ran to Jowhar, and the Governor's Palace housed the colonial administration. In 1940 Italo-Somalis numbered about 22,000 of the city's 50,000 people. British forces captured Mogadishu in February 1941, and from 1950 to 1960 it was the capital of the Italian-administered UN Trust Territory. On 1 July 1960 the former British Somaliland and the trust territory united as the Somali Republic, with Mogadishu as capital.

The coup of 21 October 1969 brought Mohamed Siad Barre to power. His government's collapse in 1991 was followed by a civil war that tore the city apart, with the militias of Mohamed Farah Aidid and Ali Mahdi Mohamed fighting for control; the 1993 Battle of Mogadishu took place during the UN operation that followed. The Transitional Federal Government moved into Villa Somalia after President Abdullahi Yusuf Ahmed entered the city on 8 January 2007. Al-Shabaab was pushed out of the capital by August 2011, and the Federal Government of Somalia was established on 20 August 2012, the first permanent central government since the war began.

Arba'a Rukun Mosque, the Mosque of Islamic Solidarity and the Ruined Cathedral

Islam reached the Benadir coast early, and by the thirteenth century the geographer Ibn Sa'id described Mogadishu as the leading Islamic centre in the region. Among the oldest surviving mosques is the Arba'a Rukun Mosque in the Shangani district, built around 1268 to 1269. An inscription in its mihrab from the same year commemorates its founder, Khusra ibn Mubarak al-Shirazi. The Fakr ad-Din Mosque dates from the same period. The medieval city also produced Abd al-Aziz of Mogadishu, whom the traveller Ibn Battuta described as a governor in the Maldives.

The largest mosque in the city, and in the Horn of Africa, is far newer. The Mosque of Islamic Solidarity was completed in 1987 with money from the Saudi King Fahd bin Abdul Aziz Al Saud Foundation and can hold up to 10,000 worshippers. Federal authorities finished refurbishing it in 2015 as part of a campaign to renovate the capital's mosques, including the historic Central Mosque downtown.

The city's colonial layer is visible in a very different building. The Mogadishu Cathedral was built between 1923 and 1928 by the Italian authorities in a Norman style modelled on the cathedral of Cefalù in Sicily, and served as the seat of the Roman Catholic Diocese of Mogadiscio until 1991. It fell out of use in the civil war and much of it was destroyed in late 2008; in April 2013 the diocese announced plans to rebuild it, but reconstruction had not begun as of 2023, and its roofless shell remains one of the city's landmarks.

The roofless stone facade of Mogadishu Cathedral with Gothic arches and one ruined tower, above a flight of steps
The ruined facade of Mogadishu Cathedral, completed in 1928 in a Norman style. Photo: Mar Sharb, CC BY 2.0, via Wikimedia Commons

Somalia as a whole is more than 99 percent Muslim, overwhelmingly Sunni, and the provisional constitution makes Islam the state religion. In Mogadishu the two big mosques and the ruined cathedral together sum up its religious history better than any statistic.

Toob Benadir Cloth, Gold and Bakaara Market

Trade explains why Mogadishu exists at all. The first-century Greek Periplus of the Erythraean Sea lists a series of ports on this coast, and the ancient port of Sarapion is believed to be the city's predecessor. By the Middle Ages Mogadishu dominated the regional gold trade. When Ibn Battuta arrived in 1331 he found "an exceedingly large city" ruled by a Somali sultan, Abu Bakr ibn Shaikh 'Umar, and noted the fine cloth it exported to Mamluk Egypt. That cloth, called toob benadir, was woven for the markets of Egypt and Syria. The Portuguese traveller Duarte Barbosa, writing around 1517 and 1518, reported ships arriving from Cambay in India and from Aden with cloth and spices and leaving with gold, ivory and beeswax. The city was famous enough that Marco Polo confused it with Madagascar, and the island's name is thought to come from his garbled version of Mogadishu.

Vasco da Gama, sailing past in the fifteenth century, described houses four or five storeys high, large palaces and many mosques with cylindrical minarets. Commerce outlived the sultanates. When the British explorer John Kirk visited in 1873, he counted about 20 large dhows at Mogadishu and Merca loaded with grain grown on Geledi farms along the Shebelle. Omani and later Zanzibari agents collected customs in the city, and the Fort of Garessa was completed for them in 1870, with the permission of the Geledi sultan, who held the real power.

The modern commercial heart is Bakaara Market, created in late 1972 under the Barre government as an open market for produce, clothing and everything else. During the civil war militant groups controlled it and used it as a base. After 2011 it was rebuilt: shops reopened selling fruit, garments and building materials, and by 2013 a new warehouse there was renting for $2,000 a month.

A man in a checked headscarf pushes a wooden handcart down a sandy street towards Bakara Market in Mogadishu, with low roofs and a tower block behind
A porter pushes a handcart towards Bakaara Market in Mogadishu in October 2013. Photo: AMISOM Public Information, CC0, via Wikimedia Commons

The port, the largest harbour in Somalia, was handed to the Turkish firm Albayrak in September 2014, with an $80 million modernisation plan. Turkey's role runs through the recovery: the Istanbul municipality set up a construction yard in 2012, and Somali and Turkish engineers upgraded the 23-kilometre road to Aden Adde International Airport in late 2013. The First Somali Bank opened in May 2012 as the first commercial bank in southern Somalia since 1991, and Hormuud Telecom, the largest telecommunications company in southern and central Somalia, is based in the city. The mayor's office counted more than 6,000 new buildings constructed between 2020 and 2025.

Hamar Weyne Streets, Bajaj Rides and Lido Beach

Everyday Mogadishu is shaped by its oldest neighbourhood and its newest habits. Hamar Weyne, whose name combines hamar (red) and weyn (big), is the historic core, home to the Benadiri community descended from centuries of intermarriage between Somalis, Arab and Persian settlers and others. The nickname Xamar itself may refer to the reddish sand on which the city was built.

Getting around means minibuses first and auto rickshaws, known locally as bajaj, second. Around 3,000 of them work the streets, typically charging about half the taxi or minibus fare. In January 2014 the Banaadir administration began naming streets, numbering houses and assigning postcodes; by 2016 there were postal codes for 156 localities. The National Theatre, opened in 1967, closed during the war and reopened in March 2012, and Mogadishu Stadium, built in 1978 with Chinese engineers, hosted league football as well as presidential speeches.

The climate is drier than its position near the equator suggests. Mogadishu is classed as hot semi-arid (BSh), with a mean temperature of about 27 °C, roughly 429 mm of rain a year spread over 47 wet days, and humidity averaging 79 percent. On holidays such as Eid al-Fitr, crowds pack Lido Beach on the city's shore.

Crowds wade into the surf and stand on rocks at Lido Beach in Mogadishu, with a building under construction and a crane behind
Crowds on Lido Beach, Mogadishu, during Eid al-Fitr. Photo: AMISOM Public Information (Tobin Jones), CC0, via Wikimedia Commons

The beach also shows how fragile that revival is. Al-Shabaab still carries out attacks in the capital: a truck bombing in October 2017 killed more than 500 people, a double car bombing in October 2022 killed more than 120, and a suicide bombing at Lido Beach in August 2024 killed 37. Life in the city carries on alongside that risk, with new hotels near the airport, universities such as SIMAD and Benadir University, and a diaspora that has been coming home to invest since 2012. The coast, the Shebelle River, which comes within about 30 km of the coast near the city before turning southwest, and the dry interior are covered in our guide to Somalia's geography; the place of Islam in national life is set out in religion in Somalia; and the very different northern city that claims to be a capital in its own right is profiled in our piece on Hargeisa.

Quick Facts About Mogadishu

  • Country: Somalia
  • Continent: Africa (East Africa)
  • Country population: approximately 20.3 million
  • Capital city status: Mogadishu is the capital of Somalia, the seat of national government, and the location of foreign embassies, parliament, and the head of state's official residence.

Frequently Asked Questions

What is the capital of Somalia?

The capital of Somalia is Mogadishu. Mogadishu is the seat of national government, hosts most foreign embassies and consulates, and is typically where the head of state and parliament are located.

What continent is Mogadishu in?

Mogadishu, the capital of Somalia, is located in Africa, in the East Africa region. As Somalia's capital, Mogadishu serves as the country's primary connection to the broader African political, economic, and cultural sphere.

Why is Mogadishu the capital of Somalia?

Mogadishu was chosen as the capital of Somalia for reasons that typically combine geography, history, and politics. Capital city selections often reflect a desire for centrality (being accessible from across the country), historical importance (being a longstanding seat of government or culture), or neutrality (being acceptable to multiple regions or ethnic groups within the country). The specific reasons for Mogadishu's designation are detailed in the city's history above.

What is Mogadishu known for?

As the capital of Somalia, Mogadishu is best known for housing the country's central government institutions — parliament, presidential or royal residences, supreme court, and key ministries. It is also typically a major cultural and economic center within Somalia, hosting national museums, embassies, and signature monuments. The introduction and history sections above provide detailed coverage of the city's specific notable institutions and landmarks.

Related Pages