Borders of Time

Africa

The history of Somalia

The whole story, from the first peoples to today, with every state that has held Mogadishu on our historical maps.

Key dates (16)
  1. c. 3000 BCEHerders paint cattle and people on the rock shelters of Laas Geel near Hargeisa.
  2. c. 1470 BCEAn Egyptian expedition sent by Hatshepsut trades with the Land of Punt, often placed on the Horn of Africa.
  3. 1331Ibn Battuta visits Mogadishu and describes a wealthy Muslim trading city ruled by a sultan.
  4. 1529Imam Ahmad ibn Ibrahim al-Ghazi of Adal defeats the Ethiopian army at Shimbra Kure.
  5. 1887Britain completes its protectorate over the northern coast, later British Somaliland.
  6. 1920British air and ground forces destroy the Dervish state of Mohammed Abdullah Hassan.
  7. 1925Fascist Italy begins the conquest of the northern sultanates of Hobyo and Majeerteen.
  8. 1960British Somaliland and the Italian trust territory become independent and unite on 1 July.
  9. 1969General Mohamed Siad Barre seizes power after the assassination of President Shermarke.
  10. 1977Somalia invades the Ogaden region of Ethiopia and is defeated the following year.
  11. 1988Government forces bomb Hargeisa during a campaign of mass killing against the Isaaq.
  12. 1991Siad Barre is overthrown; Somaliland declares its independence on 18 May.
  13. 1993The battle of Mogadishu leads to the withdrawal of United States and United Nations forces.
  14. 2006Ethiopian troops drive the Islamic Courts Union from Mogadishu and al-Shabaab emerges.
  15. 2012A new federal government and provisional constitution replace the transitional authorities.
  16. 2025Israel becomes the first UN member state to recognise Somaliland, on 26 December.
Hear the whole article read aloud

Somalia occupies the Horn of Africa, the long eastern tip of the continent facing Arabia across the Gulf of Aden. For thousands of years its people were herders, while its coast traded frankincense, myrrh and ivory with Egypt, Arabia, India and beyond. Islam arrived early, and Muslim city-states and sultanates such as Mogadishu, Adal and the Ajuran dominated the medieval and early modern Horn. In the late nineteenth century the Somali lands were divided between Britain, Italy, France and Ethiopia, and two of those pieces united as independent Somalia in 1960. Military rule under Siad Barre ended in state collapse and civil war in 1991, after which the north-west declared itself the independent Republic of Somaliland, and a federal government in Mogadishu has since been rebuilding authority against the jihadist insurgency of al-Shabaab.

Early peoples, Punt and the incense coast

Stone tools show that the Horn of Africa was inhabited in the Old Stone Age. Pastoralism spread across the dry lowlands in the last millennia BCE. The most striking evidence comes from Laas Geel, a group of rock shelters near Hargeisa, where painters some five thousand years ago covered the walls with brightly coloured cattle, often wearing decorated neck pieces, alongside people raising their arms before them.

The Somali language is Cushitic, related to Afar and Oromo. Historians once thought the Somalis had come from Arabia, but linguistic and archaeological work points to an origin in the southern Ethiopian highlands and the lowlands around Lake Turkana, from which Somali-speaking pastoralists spread north and east over many centuries. Somali society came to be organised in large clan families, among them the Dir, Isaaq, Darod, Hawiye and the farming Digil and Mirifle, which remain the basic units of politics. Egyptian texts from the third millennium BCE onwards describe expeditions to the Land of Punt, a source of incense, ebony, gold and exotic animals. The most famous was sent by the female pharaoh Hatshepsut around 1470 BCE and is illustrated in her temple at Deir el-Bahari. The location of Punt is debated: many scholars place it on the southern Red Sea coast of Eritrea and Sudan, others on the Somali coast, and some think it covered both sides of the strait. Its rulers traded directly with ancient Egypt.

By the first century CE the Greek merchant guide known as the Periplus of the Erythraean Sea listed a string of market towns along what it called Barbaria, the northern Somali coast, including Malao near modern Berbera and Opone near Hafun. They exported frankincense, myrrh and tortoiseshell to Roman Egypt. The coast lay at the edge of the trading world of the Kingdom of Aksum in the Ethiopian highlands and of the South Arabian kingdoms of Yemen.

Islam and the coastal sultanates

Islam reached the Horn very early, through the Red Sea trade, and by the tenth century Muslim communities were established at Zeila on the Gulf of Aden and along the Indian Ocean coast. Mogadishu, Merca and Barawa grew into wealthy city-states, trading cloth, livestock and ivory with Arabia, Persia and India, and sharing in the Indian Ocean commerce of the Swahili coast further south. Mogadishu minted its own coins, and its sultans, of the Fakhr ad-Din and later dynasties, controlled part of the gold trade from Sofala. When Ibn Battuta visited in 1331 he found a large city whose fine cloth was exported as far as Egypt. In the early fifteenth century ships of the Ming admiral Zheng He called at Mogadishu and Barawa.

Inland, along the Shabelle river, the Ajuran Sultanate rose in the thirteenth century and lasted until the late seventeenth. Its rulers controlled wells and irrigation in the river valley and built stone fortresses and cisterns. When the Portuguese Empire entered the Indian Ocean after Vasco da Gama, its fleets attacked the Somali ports, and Barawa was sacked in 1506. The Ajuran allied with the Ottoman Empire against the Portuguese, but internal revolts and the rise of new clan powers brought it down in the later seventeenth century.

Adal, the Ethiopian wars and the clan sultanates

In the north-west, Zeila became the port of a series of Muslim states in the eastern Ethiopian highlands and lowlands, first the sultanate of Ifat and then, from the fifteenth century, Adal, whose population included Somali, Afar and Harari peoples. It fought repeated wars with the Christian empire of Ethiopia, and in the early sixteenth century moved its capital inland to Harar.

Around 1527 a young commander, Imam Ahmad ibn Ibrahim al-Ghazi, known in Somali as Ahmed Gurey, the left-handed, launched a holy war against Ethiopia with an army that included many Somali clansmen and Ottoman-supplied musketeers. He crushed the Ethiopian army at Shimbra Kure in 1529 and over the next decade overran most of the highlands, burning churches and monasteries. The Ethiopian emperor appealed to Portugal, and a small Portuguese force under Cristóvão da Gama, son of Vasco, arrived in 1541. Imam Ahmad was killed in battle at Wayna Daga in 1543, and his conquests collapsed. The war exhausted both sides, and the northward migrations of the Oromo in the following decades weakened Adal further, though Harar survived as a walled city-state. After the Ajuran, power in the south passed to the Geledi Sultanate centred on Afgooye, which dominated the Shabelle farmlands and the caravan trade into Mogadishu in the eighteenth and nineteenth centuries. In the north the Isaaq Sultanate emerged in the mid-eighteenth century, and Berbera held a great winter trade fair for caravans from the interior and merchants from Arabia and India. In the north-east, the Majeerteen Sultanate grew rich on the frankincense trade and on salvaging the wrecks of ships along Cape Guardafui, and in the 1870s Yusuf Ali Kenadid founded the rival Sultanate of Hobyo on the central coast. In the nineteenth century the southern ports came under the nominal authority of the Omani sultans of Zanzibar, a branch of the rulers of Oman.

Partition by the colonial powers

The opening of the Suez Canal in 1869 made the Gulf of Aden a strategic route. Khedivial Egypt occupied Zeila, Berbera and Harar in the 1870s, but withdrew in the mid-1880s after the Mahdist revolt in Sudan. Britain, which needed meat for its garrison at Aden, signed treaties with the northern clans and by 1887 had declared the protectorate of British Somaliland. France took the area around Djibouti, which became French Somaliland and later Djibouti. Italy signed protectorate treaties with the sultans of Hobyo and Majeerteen in 1888 and 1889 and leased, then bought, the Benadir ports from Zanzibar, creating Italian Somaliland with its capital at Mogadishu. Menelik II of Ethiopia, expanding south and east at the same time, conquered Harar in 1887 and the Ogaden plateau, and the Somali-inhabited south-west became part of Britain's East African territory, the later Kenya. The Scramble for Africa thus divided the Somali people among five territories.

Resistance was fierce. From 1899 the religious leader Mohammed Abdullah Hassan, whom the British called the "Mad Mullah", led a Dervish movement that fought British, Italian and Ethiopian forces for two decades from a chain of stone forts, the largest at Taleh. Four British expeditions failed to defeat him, and the fighting devastated the northern interior. In 1920 the British Empire used aircraft in one of its first air campaigns in Africa, bombing Taleh, and the Dervish state collapsed. Its leader died of influenza in Ethiopian territory later that year.

Italian rule and the Second World War

Under Benito Mussolini, Fascist Italy brought its Somali territory under direct military control. Governor Cesare Maria De Vecchi conquered Hobyo and the Majeerteen sultanate between 1925 and 1927 after hard fighting, and Britain transferred Jubaland, west of the Jubba river, to Italy in 1925. Italian settlers developed banana and sugar plantations along the rivers, worked largely by forced Somali labour. A clash at the Walwal wells in December 1934 gave Mussolini a pretext to invade Ethiopia, and Somalia became part of Italian East Africa.

In the Second World War, Italy conquered British Somaliland in August 1940, but British and Commonwealth forces retook it and occupied Italian Somalia in 1941. For a decade almost all the Somali territories, including the Ogaden, were under British military administration. The Somali Youth League, founded in 1943, became the leading nationalist party and campaigned for the unity of all Somalis. Britain returned the Ogaden to Ethiopia in 1948 and the Haud grazing lands in 1954. In 1950 the United Nations made former Italian Somaliland a trust territory under Italian administration, with independence promised after ten years.

Independence and the Somali Republic

British Somaliland became independent on 26 June 1960, and on 1 July it joined the former trust territory to form the Somali Republic, part of the wider decolonisation of Africa. Aden Abdullah Osman became president. The new state held competitive elections and saw peaceful changes of government in its first decade, but northerners soon felt marginalised by a capital and administration centred in the south, and a group of northern officers attempted a coup in 1961.

The five-pointed star on the flag stood for the five Somali territories, and the aim of a Greater Somalia brought conflict with neighbours. Somalia supported Somali insurgents in Kenya's Northern Frontier District in the Shifta War from 1963 to 1967 and fought border clashes with Ethiopia in 1964. In 1967 Abdirashid Ali Shermarke became president, with Mohamed Haji Ibrahim Egal as prime minister. On 15 October 1969 Shermarke was assassinated by a bodyguard, and six days later the army under General Mohamed Siad Barre seized power.

Siad Barre, the Ogaden War and state collapse

Siad Barre's Supreme Revolutionary Council proclaimed scientific socialism, nationalised banks and plantations, banned clan politics in name and allied Somalia with the Soviet Union, which built a naval base at Berbera. In 1972 the government adopted a Latin script for Somali and sent students into the countryside on mass literacy campaigns. A severe drought in 1974 and 1975 led to the resettlement of many nomads as farmers and fishermen.

In July 1977, as Ethiopia was convulsed by revolution, Somalia invaded the Ogaden in support of the Western Somali Liberation Front and quickly overran most of the region. The Cold War powers then changed sides: the Soviet Union backed Ethiopia's new Marxist regime, and Soviet arms and advisers and some 15,000 troops from Cuba drove the Somalis out by March 1978. Defeat brought a flood of refugees into Somalia, and Barre turned to the United States. After the war Barre relied increasingly on his own Marehan clan and allied lineages, and armed opposition movements formed along clan lines: the Somali Salvation Democratic Front among the Majeerteen in 1978, the Somali National Movement among the Isaaq of the north in 1981, and later the United Somali Congress among the Hawiye. When the Somali National Movement attacked Burao and Hargeisa in May 1988, government forces responded by shelling and bombing the cities, reducing much of Hargeisa to ruins, and by killing Isaaq civilians across the north. Estimates of the dead in the campaign of 1987 to 1989 range from about 50,000 to 100,000 or more, and it is widely described as a genocide against the Isaaq.

Rebel forces closed in on Mogadishu, and Barre fled the capital on 26 January 1991. No government replaced him. The United Somali Congress split between the forces of Mohamed Farrah Aidid and Ali Mahdi Mohamed, and fighting among clan militias in the south, combined with drought, produced a famine in 1991 and 1992 that killed perhaps a quarter of a million people. A United Nations mission and then a large United States-led force, UNITAF, arrived from December 1992 to protect food deliveries. When the expanded UN operation clashed with Aidid, a raid in Mogadishu on 3 and 4 October 1993 turned into a battle in which eighteen American soldiers and hundreds of Somalis were killed. The United States withdrew in 1994 and the last UN troops left in 1995.

Somaliland and Puntland

On 18 May 1991, at a conference in Burao, the Somali National Movement and northern clan elders declared that the former British Somaliland was restoring its independence within the borders of 1960. The Republic of Somaliland, with its capital at Hargeisa, has since built its own government, army, currency and passports, approved a constitution by referendum in 2001 and held a series of contested but largely peaceful elections, while the south remained at war.

The federal government of Somalia, the African Union and almost every other state regard Somaliland as part of Somalia, and many people in the eastern regions of Sool and Sanaag, claimed by both Somaliland and Puntland, oppose separation; after fighting at Las Anod in 2023, pro-unity forces took control of much of that area. In January 2024 Ethiopia signed a memorandum of understanding with Somaliland for access to the sea near Berbera, which Mogadishu condemned as a violation of its sovereignty. On 26 December 2025 Israel became the first member of the United Nations to recognise Somaliland as an independent state, a step rejected by the Somali government.

In the north-east, the Majeerteen-dominated region of Puntland declared itself an autonomous state in 1998, but, unlike Somaliland, it seeks a federal Somalia rather than independence.

Al-Shabaab and the federal republic

A Transitional National Government was formed at Arta in Djibouti in 2000, and a Transitional Federal Government under Abdullahi Yusuf in Kenya in 2004, but neither controlled much of the country. In 2006 the Islamic Courts Union, a coalition of sharia courts backed by businessmen, defeated the warlords and took Mogadishu, briefly bringing order. Ethiopian troops, with American support, invaded in December 2006 and drove them out, and an African Union force, AMISOM, deployed from 2007. The courts' militant youth wing, al-Shabaab, then led an insurgency against the government and the foreign troops, later pledging allegiance to al-Qaeda.

The former Islamic Courts leader Sharif Sheikh Ahmed became president in 2009. In 2011 drought and al-Shabaab's restrictions on aid caused a famine that killed around a quarter of a million people, half of them young children. That year African Union troops pushed al-Shabaab out of Mogadishu, and Kenya sent forces into the south. In 2012 a provisional constitution established the Federal Republic of Somalia, with federal member states such as Jubaland, South West, Galmudug and Hirshabelle, and parliament elected Hassan Sheikh Mohamud president. Al-Shabaab, though driven from the main towns, continued to control much of the countryside and to carry out bombings, the worst of which, a truck bomb in Mogadishu on 14 October 2017, killed more than five hundred people. Mohamed Abdullahi Mohamed, known as Farmajo, was president from 2017; his attempt to extend his term in 2021 led to clashes in the capital. Parliament elected Hassan Sheikh Mohamud for a second time in May 2022. Government forces and clan militias recaptured many towns in central Somalia in an offensive from 2022, although an al-Shabaab offensive along the Shabelle in 2025 reversed some of those gains, and a new African Union mission continued to support the army.

In March 2024 parliament passed constitutional amendments that strengthened the presidency and promised a return to one-person, one-vote elections. Puntland withdrew its recognition of the federal government in protest, and Jubaland broke with Mogadishu later that year. The president's term expired on 15 May 2026 without agreement on how to hold the next election; the government holds that the amendments extended federal terms, while the opposition and several member states regard the term as over. In 2026 the United Nations warned that about six million people, a third of the population, faced food crises after renewed drought and cuts in aid.

Who held Mogadishu?

11 periods

The state drawn at the site of today’s capital on each of our maps. Open any year to see the borders of the time.

  1. 8000 BCE – 1500 BCEBantuMap of 8000 BCE →
  2. 1500 BCE – 700 CEWest African cereal farmersMap of 1500 BCE →
  3. 700 CE – 800 CEMakuriaMap of 700 CE →
  4. 800 CE – 1000 CEBantu peoplesMap of 800 CE →
  5. 1000 CE – 1492 CEIslamic city-statesMap of 1000 CE →
  6. 1492 CE – 1715 CENo state drawn here on the mapMap of 1492 CE →
  7. 1715 CE – 1878 CEZanzibarMap of 1715 CE →
  8. 1878 CE – 1914 CENo state drawn here on the mapMap of 1878 CE →
  9. 1914 CE – 1945 CEItalian Somalilandunder ItalyMap of 1914 CE →
  10. 1945 CE – 1960 CESomaliaunder United KingdomMap of 1945 CE →
  11. 1960 CE – todaySomaliaMap of 1960 CE →

Empires and states on this land

8

Every state in the atlas whose territory, at its height, reached into today’s Somalia.

Somalia elsewhere on the site

People
Ahmad ibn Ibrahim al-Ghazi, Jomo Kenyatta, Menelik II
Empires and states
Cushitic-speaking peoples, Italian Somaliland
Events
2004 Indian Ocean earthquake and tsunami, Ethiopian–Adal War, Ogaden War
Other countries
Djibouti, Ethiopia, Kenya

Who ruled its cities?