From approximately 1000 to 1500 AD, a number of city-states on the eastern coast of Africa participated in an international trade network and became cosmopolitan Islamic cultural centers. The major autonomous, but symbiotic, city-states stretched over 1,500 miles from Mogadishu (in modern day Somalia) in the north to Sofala (in modern Mozambique) in the south and included Mombasa, Gedi, Pate, Lamu, Malindi, Zanzibar, and Kilwa.
Each of these cities evolved from agricultural villages that produced goods on a small scale. Over time, these villages intensified their small-scale agricultural economies to create surpluses for trading. This shift also changed the structure of the society of these villages as more wealth created an elite merchant class. The new prosperity elevated some agricultural villages into towns and cities, while others were founded to capitalize on the opportunities sparked by the growing Indian Ocean trade.
These city-states also exported natural resources. Local merchants gathered ivory from the south, gold from the western interior and frankincense and myrrh from northern Africa. Kilwa, Pate, and Mogadishu also developed a local textile industry while Kilwa and Mogadishu extracted copper from nearby mines. All of the states produced pottery. Ironworking had evolved in East Africa before the rise of the city states. They improved the process and produced iron objects for trade as well as local use.
Archaeology studies provide evidence that the city states carried on a flourishing long distance trade with Persia, India, and China. Coins from these states have been found in each of the African city states. Also found were examples of pottery from Persia and Arabia, Chinese qing bai, and Cizhou wares as well as kohl sticks, glass beads, bronze mirrors, and objects of rock crystal reflect the China trade. Other wares from Indonesia, dating back to the 13th century, indicate that Southeast Asia was also part of the East African city state commercial world.
By 1350 all of the city-states had converted to Islam partly because of commercial advantages but also because of the large scale Shirazi (Persian) immigration to the area. Although the name suggests that most immigrants came from Shiraz in southern Persia, in fact they migrated from a number of locals stretching from the Arabian Peninsula to what is now Pakistan. Many of these families had long established trading relationships and often brought substantial wealth which placed them at the head of the local merchant class. The new ruling elite gradually homogenized the immigrant and indigenous African communities and in the process created the distinctive Swahili culture and language that extended from Mogadishu to Sofala.
By the end of the 14th century, architecture of the city-states followed similar styles and construction techniques, especially in the domestic structures and tombs. Coral stone and concrete mosques also developed in the city-states. The architecture also reflected a luxurious lifestyle for the merchant class and a complex economy with varying levels of craftsmanship and expertise.
Portuguese and Dutch dominance of the Indian Ocean trade after 1500 led to the decline of the city states. Many of them such as Sofala and Kilwa became outposts of European colonial authority. The lack of an integrated political system ultimately rendered the city-states unprepared for the militarily well-equipped Portuguese and Dutch. Also the growth of powerful interior states such as Buganda reduced the trading influence of these city-states in the interior.