Tanganyika became independent on Dec. 9, 1961; Zanzibar on Dec. 10, 1963. On April 26, 1964, the two nations merged into the United Republic of Tanganyika and Zanzibar. The name was changed to Tanzania six months later.
An invasion by Ugandan troops in Nov. 1978 was followed by a counterattack in Jan. 1979, in which 5,000 Tanzanian troops were joined by 3,000 Ugandan exiles opposed to President Idi Amin. Within a month, full-scale war developed. Tanzanian president Julius Nyerere kept troops in Uganda in open support of former Ugandan president Milton Obote, despite protests from opposition groups, until the national elections in Dec. 1980.
In Nov. 1985, Nyerere stepped down as president. Ali Hassan Mwinyi, his vice president, succeeded him. Running unopposed, Mwinyi was elected president in October. Shortly thereafter plans were announced to study the benefits of instituting a multiparty democracy, and in Oct. 1995 the country's first multiparty elections since independence took place.