Tanganyika was a sovereign state from 1961 to 1964. It was situated between the Indian Ocean and the African Great Lakes of Lake Victoria, Lake Nyasa and Lake Tanganyika. It gained independence from the United Kingdom as a Commonwealth realm on 9 December 1961, becoming a republic within the Commonwealth of Nations exactly a year later, on 9 December 1962. From 1962 to 1964 it was officially called the Republic of Tanganyika. On 26 April 1964, Tanganyika joined with the People's Republic of Zanzibar and Pemba to form the United Republic of Tanganyika and Zanzibar, a new state that changed its name to the United Republic of Tanzania within a year.