Mogadishu literally means 'The Seat of the Shah' (from the Arabic Maq'adul Shah). Those who grew up during the period when Italy controlled the city (from 1920 to 1960) often refer to the city by its Italian name Mogadiscio, though many Somalis spell it Muqdisho. Most Somalis, however, refer to the city by its original name Hamar (spelt Xamar in Somali).
The city has a long history that dates back to the tenth century when Arab and Persian traders began settling there. Historical records indicate that the city was a traditional centre for Islam; Mogadishu's mosques are known to be among the oldest in Sub-Saharan Africa. The city was prosperous and cosmopolitan when the famous Moroccan traveller Ibn Batuta arrived there in 1331. He described Mogadishu as 'an exceedingly large city' where rich merchants sold the finest cloth, silver and gold jewellery, and where camels were traded and slaughtered. Chroniclers of Batuta's travels say that when he arrived in the city, he found that it was ruled by a Somali sultan originally from Berbera in the north who spoke fluent Somali and Arabic.
In the fifteenth and sixteenth centuries, the Kingdom of Cambaya in India was bringing cloth and spices to Mogadishu in exchange for gold, wax and ivory.
When the Portuguese explorer and ship captain Vasco de Gama passed through Mogadishu in the fifteenth century, he described it as a large city with big palaces and many mosques. The city was also the site of competition and rivalry between the Portuguese and Turks in the sixteenth century when the Turkish buccaneer Amir Ali Bey persuaded the citizens of Mogadishu to declare their loyalty to the Ottoman Empire and repel the encroaching Portuguese who had ambitions to capture and control East African port cities.
Located in the coastal Benadir region, Mogadishu was for centuries an important hub for trade with communities along the Indian Ocean coastline. In the fifteenth and sixteenth centuries, the Kingdom of Cambaya in India was bringing cloth and spices to Mogadishu in exchange for gold, wax and ivory. In 1844 the English explorer Richard Burton reported seeing Arab and Indian merchants in Somalia and his compatriot John Speke recalled a Somali speaking to him in Hindustani.
In the eighteenth and nineteenth centuries Mogadishu operated largely as a city-state, administered by absentee sultans from Oman, who governed several East African coastal cities via Muscat and Zanzibar. The sultans of Oman had vast commercial interests on the East African coastline, which were eventually usurped by the British and other Europeans at the end of the nineteenth century when the Arab slave trade was abolished and Europeans began their 'Scramble for Africa' that led to the colonisation of the continent by European powers. In 1871, Mogadishu came under the control of Sultan Barqash of Zanzibar, and, twenty years later, was leased to Italy, when it became the headquarters of Italian Somaliland until independence in 1960.
Mogadishu's growth evolved in three distinct phases. The early Arab and Persian settlers lived mostly in Hamarweyn (literally 'old' or 'greater' Mogadishu) and Shangani areas. This part of the city boasts traditional Arab-style architecture, with closely-knit stone and coral multi-storeyed houses overlooking the sea. This type of architecture can also be found in other East African coastal cities, such as Mombasa, Lamu and Zanzibar.
The second phase of Mogadishu's growth coincided with the Italian colonial period from 1920 to 1960 when the city expanded beyond Hamarweyn and Shangani and evolved as an administrative and commercial centre. It was during this period that Italian-style architecture, complete with majestic arches and cathedrals, became prevalent. In 1929 the first master plan for the city was developed, aiming to make Mogadishu a modern city, with boulevards, parks and waterfronts reminiscent of Mediterranean culture.
Independence in 1960 led to the third phase of the city's development, which saw an influx of migrants from other parts of the country to the city as it consolidated its position as the country's political, commercial and administrative capital. In the first nine years after independence, Mogadishu served as the capital of a peaceful and democratic state. This changed in 1969, when a coup d'état installed mohamed Siyad Barre as the president, ushering in a new era of Soviet-style highly centralised form of governance that was dictated largely by the Cold War. Although Barre introduced several progressive reforms, including widespread literacy and the adoption of the Latin script for the Somali language, his rule was seen as largely autocratic, nepotistic and repressive. His ouster in 1991 unleashed the civil war that saw various warlords fighting for supremacy. The civil war and subsequent military actions in the next two decades led to the large-scale destruction of one of Africa's most beautiful cities.