Mogadishu is located in a country.
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 . 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 .