Mogadishu ( [ ˌmɔːɡəˈdiːʃuː ] Muqdisho [ mʉqdɪʃɔ ] ; مقديشو [ maqadiːʃuː ] ) , known locally as Hamar , is the capital and most populous city of Somalia . Tradition and old records assert that southern Somalia , including the Mogadishu area , was historically inhabited by hunter-gatherers . The city later became the capital of Italian Somaliland ( 1889 -- 1936 ) in the colonial period . As Somalia 's capital city , many important national institutions are based in Mogadishu . It is the seat of the Federal Government of Somalia established in August 2012 , with the Somalia Federal Parliament serving as the government 's legislative branch .
Mogadishu is only a country.