Mogadishu is a city.
Mogadishu ( [ ˌmɔːɡəˈdiːʃuː ] Muqdisho [ mʉqdɪʃɔ ] ; مقديشو [ maqadiːʃuː ] ) , known locally as Hamar , is the capital and most populous city of Somalia . Located in the coastal Banaadir region on the Indian Ocean , the city has served as an important port for millennia . The city later became the capital of Italian Somaliland ( 1889 -- 1936 ) in the colonial period . After the ousting of the Siad Barre regime in 1991 and the ensuing Somali Civil War , various militias fought for control of the city , later to be replaced by the Islamic Courts Union in the mid-2000s . As Somalia 's capital city , many important national institutions are based in Mogadishu .