Julius Nyerere
Presidency of Tanganyika: 1962–1964

On 9 December 1962, a year after independence, Tanganyika became a republic. Nyerere moved into the State House in Dar es Salaam, the former official residence of British governors. Nyerere disliked life in the building, but remained there until 1966. Nyerere appointed Kawawa his vice president. In 1963, he put his name forward to be Rector of Edinburgh University, vowing to travel to Scotland whenever needed; the position instead went to the actor James Robertson Justice. He made official visits to West Germany, the United States, Canada, Algeria, Scandinavia, Guinea, and Nigeria. In the U.S. he met President John F. Kennedy and although they personally liked each other, he failed to convince Kennedy to toughen his stance on apartheid South Africa.

The early years of Nyerere's presidency were preoccupied largely by African affairs. In February 1963, he attended the Afro-Asian Solidarity conference in Moshi, where he cited the recent Congolese situation as an example of the neo-colonialism, describing it as part of a "second" Scramble for Africa. In May, he attended the founding session of the Organisation for African Unity (OAU) at Addis Ababa in Ethiopia, there echoing his previous message, stating that "the real humiliating truth is that Africa is not free; and therefore it is Africa which should take the necessary collective measures to free Africa." He hosted the OAU's Liberation Committee in Dar es Salaam and provided weapons and support to anti-colonial movements active in southern Africa.

Nyerere endorsed the Pan-Africanist idea of unifying Africa as a single state, although he disagreed with the Ghanaian President Kwame Nkrumah 's view that this could be achieved quickly. Instead, Nyerere stressed the idea of forming regional confederations as short-term steps towards the eventual unification of the continent. Pursuing these ideals, in June 1963 Nyerere met with Kenyan President Jomo Kenyatta and Ugandan President Milton Obote in Nairobi, where they agreed to unite their respective countries into a single East African Federation by the end of the year. This, however, never materialised. In December 1963, Nyerere lamented that this failure was the major disappointment of the year. Instead, the East African Community was launched in 1967, to facilitate some cooperation between the three countries. Later, Nyerere saw his inability to establish an East African Federation as the biggest failure of his career.

Nyerere was concerned by developments in Zanzibar, a pair of islands off of Tanganyika's coast. He noted that it was "very vulnerable to outside influences", which could in turn impact Tanganyika. Nyerere was keen to keep Cold War conflicts between the U.S. and Soviet Union out of eastern Africa. Zanzibar secured independence from the British Empire in 1963, and in January 1964 the Zanzibar Revolution took place, in which the Arab Sultan Jamshid bin Abdullah was overthrown and replaced by a government consisting largely of indigenous Africans. Nyerere was taken by surprise by the revolution. Like Kenya and Uganda, he quickly recognised the new government, although allowed the deposed Sultan to land in Tanganyika and from there fly to London. At the request of the new Zanzibar government, he sent 300 policemen to the island to help restore order.
detectable_content:number_placeholders[7]