Uganda was called a protectorate of the British Empire before independence. The British Empire declared Uganda a protectorate in 1894, and the area was ruled by the United Kingdom until 1962 when Uganda gained independence. Before colonization, Uganda was inhabited by various ethnic groups, including the Buganda kingdom, which was the largest and most powerful kingdom in the region. The Buganda kingdom was formally declared a British protectorate in 1900.