It is difficult to appreciate just how important an island Zanzibar was in the eighteenth and nineteenth centuries. This tiny island off the East coast of Africa dominated trade between Africa, India and the Middle East. In particular, it was the key tripod for the highly profitable slave trade. Arab traders would use Zanzibar as their base to launch slave raiding expeditions in the interior of Eastern Africa. Alternatively, African slavers would know exactly where they could find a market for any enemies they may have captured. Cloves, ivory, spices, tea, coffee, gold were also part of this trade triangle. Huge caravans would travel into and out of the African interior bringing with them goods that could fetch a fortune in India or the Middle East or markets beyond.
The sultanate of Muscat and Oman took control of the island in the early Eighteenth Century by displacing a small Portugese post. It was helpful that, with a little careful timing, there were trade winds which carried dhows from Zanzibar over to India then there were winds which would take the dhows from India to Oman and then there were winds which would complete the triangle. At each stage, the traders could earn a fortune. Over the course of the Eighteenth Century, the Sultanate of Oman became a wealthy and powerful regional power. It was more than able to withstand European encroachment and could maintain their independence.
In the Nineteenth Century, Europeans were attracted to the wealth of the tiny island. It was such an obvious trading entrepot and was one of the few places in Africa that had plenty of cash. It was also helpful that the island climate was more accommodating to Europeans and there were less nasty diseases to afflict them than in most of the rest of the continent. It was a natural hub of civilisations, even if much of the wealth was a by-product of slavery.
In 1841, Sultan Abu Said realised that the Zanzibar part of his empire was the wealthiest and had the most opportunity before it. He therefore moved his court to the East African island to take even more advantage of the commercial opportunities. British influence would also grow partly as a result of their increased power in the target market of India and partly because of the power of the Royal Navy. The East India Company and Bombay merchants would all have representatives on the island to coordinate the purchase and movement of goods. The Sultan was happy to use some of his wealth to access the latest European weapons and technology. This was a good example of the soft power of the informal empire. Britain got excellent access to East Africa at little administrative cost to itself.
Unfortunately, slavery would be a constant thorn in the side of relations between Zanzibar and Britain. Missionaries like Livingstone would advertise the evils of the East African slave trade to a British public that was repulsed by the trade. The electorate would put pressure on the British government to suppress the East African slave trade as effectively as they had waged against the West African trade. This pressure would be transferred to the Sultan through the offices of the British Consuls. In 1873, they finally got their way when the Sultan agreed to ban slavery in his realms - which by this time included much of the Eastern African coast if not the interior. Still, it was a massive coastline and slavery still continued. However, this British pressure would begin the slide in Zanzibari fortunes. Slave traders would find alternative outlets. The slaves carrying ivory would be forced elsewhere. The good intentions of the British would ultimately have dire consequences for the Sultan of Zanzibar.
In the meantime, Zanzibar was almost lost to the Germans in the scramble for Africa. In 1885, Germany declared a protectorate over Tanganyika (modern day Tanzania). Germany was concerned that she had been excluded from her place in the sun and her active searching for unclaimed territories would have serious consequences for the African continent. Zanzibar looked to Britain for protection but Britain had agreed with the Germans that they would take control of the more northerly Kenya. A compromise was reached however in 1890 when Britain agreed to trade the tiny North Sea island of Heligoland for a protectorate over Zanzibar. Britain's informal relationship had just got a little more formal.
The British considered Zanzibar an essentially Arab country and maintained the prevailing power structure. The office of sultan was retained (although stripped of most of its power), and Arabs, almost to the exclusion of other groups, were given opportunities for higher education and were recruited for bureaucratic posts. The chief government official during the period 1890 to 1913 was the British consul general, and from 1913 to 1963 it was the British resident. From 1926 the resident was advised by a legislative assembly.