Lying on the E coast of Africa, the United Republic of Tanzania was formed by the union of Tanganyika and Zanzibar in 1964. Julius Nyerere of Tanganyika became the new country’s president; and Sheik Abeid Amani Karune, Zanzibar’s leader, became his vice president. Tanzania emerged as a one-party state, and in 1967 its leaders announced their intention to guide the nation along a socialist developmental path. Much of the country’s industry and agriculture was nationalized.
Although sympathetic to Soviet and Chinese communism, Nyerere retained open relations with the United States. Massive Chinese aid built a rail line linking the Tanzanian port capital of Dar es Salaam with Lusaka, the inland capital of Zambia.
The seizure of power in neighboring Ugand a by Idi Amin in 1971 was bitterly opposed by Tanzania.
Border clashes and constant invective between the two nations became commonplace. Disputes over roads and boundaries with Kenya and Zambia also caused friction. In 1976 President Nyerere, then serving a fourth term, opened Tanzania’s borders to guerrilla fighters seeking the overthrow of white-controlled Rhodesia, now Zimbabwe. The simmering dispute with Amin blazed into full-scale war in 1978 when Ugand an troops invaded northeastern Tanzania. A counteroffensive captured Kampala, Ugand a, in 1979 and caused Amin to flee to Libya. A Tanzanian military presence in Ugand a was maintained until elections in December 1980. Troops were withdrawn in May 1981.
By the 1980s it was clear that Nyerere’s economic policies had failed. Continual cycles of alternating floods and droughts reduced agricultural production and exports. In 1985 after Nyerere resigned as he had promised the nation, Ali Hassan Mwinyi, president of Zanzibar, became head of the one-party government. He began an economic recovery program, financial and economic reforms, and the encouragement of foreign investment. In 1992 the constitution was amended to allow opposition parties. The 1995 multiparty elections were won by Benjamin William Mkapa of the ruling party, but were considered flawed by international observers.
In 1996 the capital was officially transferred from Dar es Salaam to Dodoma, although many government bodies remain in the old capital. In the 1990s Tanzania was host to more than 300,000 refugees from the war in neighboring Burundi. In 2000 Mkapa was reelected in another election with observed irregularities.