The city of Mogadishu came to be known as the City of Islam, and controlled the East African gold trade for several centuries.