Tanzania as it exists today consists of the union of what was once Tanganyika and the islands of Zanzibar. Formerly a German colony from the 1880s through 1919, the post-World War 1 accords and the League of Nations charter designated the area a British Mandate (except for a small area in the northwest, which was ceded to Belgium and later became Rwanda and Burundi).
British rule came to an end in 1961 after a relatively peaceful (compared with neighbouring Kenya, for instance) transition to independence. At the forefront of the transition was Julius Nyerere, a former schoolteacher and intellectual who entered politics in the early 1950s. In 1953 he was elected president of Tanganyika African Association (TAA), a civic organization dominated by civil servants, that he had helped found while a student at Makerere University. In 1954 he transformed TAA into the politically oriented Tanganyika African National Union (TANU). TANU's main objective was to achieve national sovereignty for Tanganyika. A campaign to register new members was launched, and within a year TANU had become the leading political organisation in the country. Nyerere became Minister of British-administered Tanganyika in 1960 and continued as Prime Minister when Tanganyika became officially independent in 1961.
Soon after independence, Nyerere's first presidency took a turn to the Left after the Arusha Declaration, which codified a commitment to Pan-African Socialism, social solidarity, collective sacrifice and "ujamaa" (familyhood). After the Declaration, banks were nationalised as were many large industries.
After the leftist Zanzibar Revolution overthrowing the Sultan in neighboring Zanzibar, which had become independent in 1963, the island merged with mainland Tanganyika to form the nation of Tanzania on April 26, 1964. The union of the two, hitherto separate, regions was controversial among many Zanzibaris (even those sympathetic to the revolution) but was accepted by both the Nyerere government and the Revolutionary Government of Zanzibar owing to shared political values and goals.
After the fall of commodity prices and the sharp spike of oil prices in the late 1970s, Tanzania's economy took a turn for the worse. Tanzania also aligned with Communist China, seeking Chinese aid in Tanzania's socialist endeavor. The Chinese were quick to comply, but with the catch that all projects be completed by imported Chinese labor. This was coupled with the fact that Tanzanians' forced relocation onto collective farms greatly disrupted agricultural efficiency and output. As a result of forced relocation, Tanzania turned from a nation of struggling sustenance farmers into a nation of starving collective farmers. The 1980s left the country in disarray as economic turmoil shook the commitments to social justice and it began to appear as if the project of socialism was a lost cause. Although it was a deeply unpopular decision, the Tanzanian government agreed to accept conditional loans from the International Monetary Fund in the mid 1980s and undergo "Structural Adjustment", which amounted in concrete terms to a large-scale liquidation of the public sector (rather large by African standards), and deregulation of financial and agricultural markets. Educational as well as health services, however modest they may have been under the previous model of development, were not spared from cuts required by IMF conditionalities.
From the mid 1980s through the early 1990s Tanzania's GDP grew modestly, although Human Development Indexes fell and poverty indicators increased.