It is thought that the Zanzibar Archipelago's earliest residents were Bantu-speaking peoples who made their way over from the Tanzanian mainland more than 2000 years ago. Zanzibar's history was shaped by its geographical position - right in the middle of the Indian Ocean trade routes, accessible to both traders and colonists. Trade relationships with Arabia and various parts of the east African coast were established as early as 700 BC. In the early part of the 1st millennium AD, permanent settlements were established as traders began to intermingle with the indigenous Bantu speakers. It was this intermingling that gradually gave rise to Swahili language and culture in the area.
Trade between the archipelago, Arabia and the Persian Gulf peaked between the 12th and 15th centuries. Zanzibar became a powerful city-state, supplying parts of the world with slaves, gold, ivory and wood. With trade from the east came Islam, which became entrenched by the 11th century. The arrival of the Portuguese in the early 16th century heralded the end of this golden age and the beginning of a wrestle for control of the archipelago. Portuguese rule was overthrown in the early 18th century by Omani Arabs, whose hold on power did not weaken until the 1860s.
During this time, the slave trade grew rapidly, fuelled by the demand for plantation slaves in North and South America. By the mid-19th century, the archipelago had become the world's largest slaving entrepôt. It is estimated that around 600,000 slaves were sold through Zanzibar between 1830 and 1873.
In 1861, Zanzibar separated from Oman and became an independent sultanate. During Sultan Barghash's rule (from 1870 to 1888), Britain and Germany divided up much of the area, securing economic control over the remaining coastal strip. In 1890, the British proclaimed a protectorate over Zanzibar and curtailed the slave trade.