Answer :
The wealth of East African city-states was primarily based on trade. Trade played a crucial role in the economic prosperity of these city-states during the medieval period. East African city-states like Kilwa, Sofala, and Mogadishu were strategically located along trade routes connecting the interior of Africa with the Indian Ocean trade network.
1. Trade Networks: These city-states engaged in trade with merchants from Arabia, Persia, India, and even China. They traded goods such as gold, ivory, iron, and slaves for luxury items like silk, porcelain, and spices.
2. Strategic Location: The location of these city-states along the coast allowed them to control and benefit from the trade passing through the region. They served as important hubs for transoceanic trade and facilitated cultural exchange between Africa and the rest of the world.
3. Economic Prosperity: The wealth generated from trade allowed these city-states to flourish, build impressive architecture, and develop sophisticated societies. The prosperity of these city-states attracted the attention of European powers like Portugal, who sought to control the lucrative trade routes.
In conclusion, the wealth of East African city-states was primarily derived from their active participation in trade networks, which brought economic prosperity and cultural exchange to the region.