The coast near Kilwa Kisiwani has been inhabited for several thousand years, and artefacts from the late and middle Stone Ages have been found on the island. Although the first settlements in the area date to around AD 800, Kilwa remained a relatively undistinguished place until the early 13th century. At this time, trade links developed with Sofala, 1500km to the south in present-day Mozambique. Kilwa came to control Sofala and to dominate its lucrative gold trade, and before long it had become the most powerful trade centre along the Swahili coast.
In the late 15th century, Kilwa’s fortunes began to turn. Sofala freed itself from the island’s dominance, and in the early 16th century Kilwa came under the control of the Portuguese. It wasn’t until more than 200 years later that Kilwa regained its independence and once again became a significant trading centre, this time as an entrepôt for slaves being shipped from the mainland to the islands of Mauritius, Réunion and Comoros. In the 1780s, Kilwa came under the control of the Sultan of Oman. By the mid-19th century, the local ruler had succumbed to the Sultan of Zanzibar, the focus of regional trade shifted to Kilwa Kivinje on the mainland, and the island town entered a decline from which it never recovered.