 By 1892 , Mogadishu was under the joint control of the Somali Sultanate of the Geledi and the <unk> Sultanate of Zanzibar . The Geledi Sultans were at the height of their power . They dominated the southern ivory trade , and also held sway over the Jubba and Shebelle valleys in the hinterland . The <unk> Sultans ' authority in Mogadishu , however , was largely nominal . When <unk> <unk> bin <unk> of Oman sought to build a fort in the city , he was thus <unk> to request permission from Sultan Ahmed Yusuf of Geledi . This Fort of <unk> was eventually constructed in 1870 . The Sultan of Zanzibar later leased and then sold the infrastructure that he had built to the Italians , but not the land itself , which was Somali owned . 
