Mogadishu was coastal on the Banaadir region on the Indian Ocean. Mombasa was similar, in this aspect. It is a city on the coast of Kenya, meaning it was another port.
Both deeply affected East African Economy, due to their geographical location (coastal).
I hope this helps!