AHC/WI: Zanzibar remains independent

Prevent the Zanzibari Revolution. Perhaps the British keep a battalion of Royal Marines on the island at a small naval base as a relic of colonialism. When the attempted coup begins, the British troops march against them and with their much better training smash the revolutionary forces. The Sultan, with Anglo-American aid, imposes a royal dictatorship. Over the next few decades, the government changes the island's demographics by expelling troublesome Africans to Tanganyika and importing Arab and Muslim South Asians to the island with offers of land and jobs, particularly in the security forces (all subsidized with Western and Gulf Arab aid). The Sultanate, with open markets with the West, also manages to gain some light manufacturing and a small banking sector that specializes in African investments. By the end of the Cold War, the island's Afro-nationalists have given up union with Tanganyika as a goal, instead advocating for a multiethnic democracy and close relations with African states as part of a political alliance with the island's liberals and social democrats.
 
Prevent the Zanzibari Revolution. Perhaps the British keep a battalion of Royal Marines on the island at a small naval base as a relic of colonialism. When the attempted coup begins, the British troops march against them and with their much better training smash the revolutionary forces. The Sultan, with Anglo-American aid, imposes a royal dictatorship. Over the next few decades, the government changes the island's demographics by expelling troublesome Africans to Tanganyika and importing Arab and Muslim South Asians to the island with offers of land and jobs, particularly in the security forces (all subsidized with Western and Gulf Arab aid). The Sultanate, with open markets with the West, also manages to gain some light manufacturing and a small banking sector that specializes in African investments. By the end of the Cold War, the island's Afro-nationalists have given up union with Tanganyika as a goal, instead advocating for a multiethnic democracy and close relations with African states as part of a political alliance with the island's liberals and social democrats.

Remember which forum this is in. The point is to keep Zanzibar from being colonised in the first place.
 
Easiest way I can think of is for Britain and another Great Power or Powers to come to an agreement to refrain from making any claims on the islands, much as Britain and France did with Hawaii. To keep Britain out you also need to have them either not become involved in the slave trade or have them make it illegal on their own much earlier. There were a couple of occasions where the British might have been able to separate Zanj, Zanzibar's mainland territory, which was the main prize from the islands, if the British already control the coast from what's now Somalia down to Mozambique and manage to lock the Germans out then Zanzibar and Pemba themselves are much less important and can be left to do their own thing.
 
Top