trade between the people in the mogadishu area with other areas along the somali sea coast of east africa started as early as the 1st century. muslim traders from the arabian peninsula came to the area during the 10th century. because of trade with them, islam spread through somalia. the portuguese tried to take control of the city, but failed. in 1871 barghash bin said, the sultan of zanzibar, controlled the city.