In 1885, the German Empire declared its intent to establish a protectorate in the area, named German East Africa (GEA). When the Sultan of Zanzibar objected, German warships threatened to bombard his palace. Britain and Germany then agreed to divide the mainland into spheres of influence, and the Sultan was forced to acquiesce.

Maji Maji Rebellion 1905 – 1907

The Maji Maji Rebellion (German: Maji-Maji-Aufstand), sometimes called the Maji Maji Jihad or Maji Maji War (Swahili: Vita vya Maji Maji, Maji-Maji-Krieg), was an armed rebellion of Islamic and Animist Africans against German colonial rule in German East Africa (now Tanzania). The war was triggered by a German policy designed to force the indigenous population to grow cotton for export, The Germans brutally put down the rebellion resulting in 250,000–300,000 total dead, mostly civilians from famine.

When British Indian forces invaded during WW1 they found that German forces under the superb leadership of General Paul von Lettow-Vorbeck using guerilla hit and run tactics were able to evade British forces throughout the entire war, this tied up a considerable number of British troops and Von Lettow did not surrender until notified about the Armistice of 11 November 1918 that ended the war.

After Germany’s defeat, German East Africa was divided among the victorious powers under the Treaty of Versailles. Apart from Ruanda-Urundi which was assigned to Belgium and the small Kionga triangle given to Portuguese Mozambique, the territory was transferred to Britain who named it Tanganyika. The territory remained under British control until 1961 when it was granted independence and renamed Tanzania.