Tanzania was made from two very different British territories. Zanzibar was an island sultanate and slave-trading centre that Britain turned into a protectorate. Tanganyika was Germany's main African colony, taken over in the First World War. They became independent separately, and joined together in 1964 after one of the most violent revolutions of Africa's independence era.
The Swahili coast had traded across the Indian Ocean for centuries. In the 19th century the Omani sultans moved their capital to Zanzibar, which became the richest port in East Africa. Its wealth came from cloves grown on plantations worked by enslaved Africans, and from the slave and ivory caravans that came down from the interior. Tens of thousands of captives passed through Zanzibar's slave market every year.
Britain had its consul in Zanzibar and the Royal Navy patrolled the coast against slave dhows. In June 1873, faced with a British ultimatum, Sultan Barghash closed the slave market and banned the seaborne slave trade. Slavery itself went on for decades. On the site of the old market, the Universities' Mission to Central Africa built Christ Church Cathedral, whose altar stands where the whipping post is said to have been.
In the 1880s Britain and Germany divided East Africa. In the Heligoland–Zanzibar Treaty of 1 July 1890, Germany gave up its claims to Zanzibar in exchange for the North Sea island of Heligoland. Zanzibar became a British protectorate, and the sultan had to accept British approval of any successor.
On 25 August 1896 the pro-British Sultan Hamad bin Thuwaini died suddenly, possibly poisoned. His cousin Khalid bin Barghash seized the palace and declared himself sultan without British approval. Britain sent him an ultimatum: stand down by 9 o'clock on the morning of 27 August, or be at war.
Khalid refused. At 9 a.m. five Royal Navy ships opened fire on the palace. Within about 40 minutes, most sources say 38, the palace was in flames, the Sultan's ship was sunk and Khalid had fled to the German consulate. Hundreds of Zanzibaris were killed or wounded; one British sailor was injured. Britain installed its own candidate, who agreed to ban slavery. It is usually called the shortest war in recorded history. For the people inside the palace, it was a massacre.
The mainland, today's Tanganyika plus Rwanda and Burundi, was German East Africa from the 1880s. German rule was brutal. The Maji Maji rising of 1905–07 in the south was crushed by a scorched-earth campaign, and tens of thousands died, many of them in the famine that followed.
In the First World War, British, Indian, South African, Belgian and African troops fought a long campaign against the German commander Paul von Lettow-Vorbeck, who only surrendered after the war in Europe had ended. Hundreds of thousands of African carriers were forced into service, and many tens of thousands of them died of disease and hunger.
After the war the territory was divided. Belgium took Rwanda and Burundi, and Britain took the rest as Tanganyika Territory, under a League of Nations mandate formally created on 20 July 1922. German estates were confiscated and auctioned; many were bought by Greek and Asian planters. Sisal became the main export.
Because Tanganyika was a mandate and not a colony, Britain had to report to the League and, after 1946, to the United Nations Trusteeship Council. That made large-scale white settlement politically difficult, and it gave Tanganyikans a way to take their complaints to an international audience. Britain ruled through chiefs, a system it called "indirect rule".
After the Second World War, Britain was short of cooking fat and margarine. In 1947 the Labour government launched a plan to clear millions of acres of bush in Tanganyika, around Kongwa and elsewhere, and grow groundnuts (peanuts) by machine. Ex-army tractors and bulldozers were shipped in, and tens of thousands of British ex-servicemen applied for the jobs.
No proper trial had been made. The soil was hard, the rains failed, the machines broke down and the crops were tiny. The scheme was abandoned on 9 January 1951, having cost about £36 million. It became a symbol of colonial planning that ignored local knowledge.
Julius Nyerere, a teacher who had studied at Makerere in Uganda and at Edinburgh University, became president of the Tanganyika African Association in 1953. On 7 July 1954 he turned it into a political party, the Tanganyika African National Union (TANU), with self-government and independence as its aims. TANU took its case to the UN in New York and grew rapidly.
TANU and its allies swept the elections of 1958–59 and 1960. The last British governor, Sir Richard Turnbull, worked closely with Nyerere, and independence came peacefully and faster than anyone had expected in 1945. Under the Tanganyika Independence Act 1961, Tanganyika became independent on 9 December 1961, with Nyerere as Prime Minister. A year later, on 9 December 1962, it became a republic with Nyerere as President.
In Zanzibar, Britain handed power to a government dominated by the Arab minority. In the July 1963 election the mainly African Afro-Shirazi Party won about 54 per cent of the vote but not a majority of seats. On 10 December 1963, under an Act of the UK Parliament, Zanzibar became independent as a constitutional monarchy under Sultan Jamshid bin Abdullah.
A month later, early on 12 January 1964, the government was overthrown in a revolution led by John Okello, a Ugandan-born labourer, with the Afro-Shirazi Youth League. The Sultan fled. Thousands of Arabs and South Asians were killed in the violence that followed. A US intelligence report later noted that the Arab regime of Zanzibar vanished in a single day as its leaders fled, died or were interned.
On the mainland, Tanganyikan soldiers mutinied later that month, and Nyerere asked Britain to send troops to restore order. Then, in secret, Nyerere and Zanzibar's new president, Abeid Karume, negotiated a union. The Articles of Union were signed on 22 April 1964, and on 26 April 1964 Tanganyika and Zanzibar became the United Republic of Tanganyika and Zanzibar, renamed Tanzania on 29 October 1964. Zanzibar keeps its own president and government to this day.
Long before Britain or Germany, the coast was home to great Swahili city-states such as Kilwa, whose ruins are a UNESCO World Heritage Site. Our partner site covers the whole continent's independence stories:
Colonial Office and Foreign Office files on Tanganyika and Zanzibar are at The National Archives in Kew. The UN Trusteeship Council's reports on Tanganyika are in the UN Digital Library online.
In Zanzibar's Stone Town, a UNESCO World Heritage Site, visit Christ Church Cathedral and the slave market memorial beneath it, the House of Wonders, and the Sultan's palace area bombarded in 1896. In Dar es Salaam, the National Museum covers the German and British periods, and the old German buildings along the waterfront still stand. Kilwa Kisiwani in the south has the ruins of the medieval Swahili city.
Entrance fees are included in the tour price; tips are not included but are always welcome.
In London:
The settler colony next door.
The protectorate on the lake.
The explorer who set out from Zanzibar to find Livingstone.
Next: north-east Africa and the Suez Canal.
All of Britain's African territories, country by country.
Britain Adventures is an independent partner website. Our partner sites on Africa and its history are where the stories on this page continue:
Search our Network. Start here.