Tanzania dates from 1964, when it was formed out of the union of the much larger mainland territory of Tanganyika and the coast of Zanzibar.
“On August 7, 1885 five German warships came to the lagoon of Zanzibar and set their guns on the sultan's palace. They had arrived with a demand from Bismarck that the Sultan cede to the German emperor, the mainland territories or face the consequences.” (HistoryWorld ) This resulted in Germany having land control until 1886, on which they gave some control back to the country, but still held land. In 1916, they retook control, as well as taking control of other colonies. The administration of the territory in the agreement of 1886 is handed over to Karl Peters' German East Africa Company. The company extends its territory to the sea from 1888, by buying a lease of the coastal strip which was left in the sultan of Zanzibar's possession. But local resentment leads to a Muslim uprising in that year which is only suppressed after the arrival of German troops, this energetic German presence is profoundly resented by the African tribes, particularly when the harsh methods of forced labor are used in the cultivation of the new and alien crops. The result, in 1905, is a widespread popular rebellion which becomes known as the Maji-Maji rising. Which happened during a drought, this rebellion caused German troops to burn crops, and burn down villages. This rebellion later causes Germany to essentially give power back, but tries for decades to create schooling and government