was this place ever colonized by any foreign power?
Yes, Italian colonialism
Mogadishu
The onset of Italian colonialism occurred in incremental stages,
where is mogadishu located? Somalia how does the place get its name? Somali word "Muuq Disho" and the Arab-Persian word "Maq'ad-i-Shāh" can you mention any one sultanate that ruled this place? Mogadishu Sultanate can you name any ruler from it? Fakhr ad-Din
wiki:5407287
Mogadishu [SEP] Introduction
Mogadishu enjoyed the height of its prosperity during the 14th and 15th centuries and was during the early modern period considered the richest city on the East African coast, as well as the center of a thriving textile industry. In the 17th century, Mogadishu and parts of southern Somalia fell under the Hiraab Imamate and then came under the direct rule of the Somali Sultanate of the Geledi. The onset of Italian colonialism occurred in incremental stages, with Italian treaties in the 1880s followed by economic engagement between various Somali clans, including the Reer Mataan and the Shaansi (Cadcad) clans like "reer Xamar" and the Italian Benadir Company and then direct governance by the Italian government after 1906 and the British Military Administration of Somalia after World War Two and the UN Italian Trust Territory in the 1950s.