Mogadishu , locally known as Xamar or Hamar, is the capital and most populous city of Somalia. The city has served as an important port connecting traders across the Indian Ocean for millennia, and has an estimated population of 2,388,000 (2021). Mogadishu is located in the coastal Banadir region on the Indian Ocean, which unlike other Somali regions, is considered a municipality rather than a maamul goboleed (federal state).