By the early 19th century, Muscat and Oman is the most powerful state in Arabia and on the East African coast. When sultan Sa'id bin Sultan Al-Busaid dies in 1856, his sons quarrel over his succession. As a result of this struggle, the empire is divided in 1861 into two separate principalities, Zanzibar, with its East African dependencies, and Muscat and Oman.
In 1888 Germany obyains a lease of the coastal strip from the sultan of Zanzibar. Three years later, in 1891, Germany establishes the protectorate of German East Africa. German rule provokes African's resistance, culminating in the Maji Maji rebellion of 1905-07. The rebellion, which temporarily unite a number of southern tribes and end only after an estimated 120,000 Africans have died from fighting or starvation, can be considered to be one of the first stirrings of nationalism. As a result of World War I, the United Kingdom occupies German East Africa in 1916. The League of Nations grants in 1922 the United Kingdom the mandate of Tanganyika. Rwanda-Urundi, western parts of German East Africa become a Belgian League of Nations mandate. The British mandate is continued in 1946 with a United Nations Trust Territory.
In 1954 Julius K. Nyerere organizes a political party, the Tanganyika African National Union (TANU). Its candidates are victorious in the Legislative Council elections of 1958-1959. In 1959 Britain agrees to the establishment of internal self-government following general elections to be held in 1960. Nyerere is chief minister of the subsequent government. In l961 Tanganyika becomes autonomous and Nyerere becomes prime minister under a new constitution. Full independence is achieved later that year. Nyerere is elected president of the Republic of Tanganyika. Tanganyika merges in 1964 with Zanzibar into the United Republic of Tanganyika and Zanzibar, later that year renamed into the United Republic of Tanzania. Under the leadership of president Julius Nyerere Tanzania becomes a two-party state in 1967, led by the Tanganyika African National Union and the Afro-Shirazi Party. To create a sole ruling party in both parts of the country, these parties merge in 1977 into the Chama Cha Mapinduzi (Revolutionary State Party, CCM).
Nyerere steps down from office and is succeeded by Ali Hassan Mwinyi in 1985. Nyerere retains his position as Chairman of the CCM for 5 more years and remains influential in Tanzanian politics until his death in 1999. The one-party state is abandoned in 1991 and Tanzania becomes formally a presidential democracy. In 1995 Benjamin Mkapa of the CCM is elected president and re-elected in 2000. Although Tanzania is now a multi-party state, the CCM still is de facto in power and the opposition doesn't have a fair chance.