Under the 1995 constitution, there is an elected president and a one-house legislature. Uganda consisted of a number of small kingdoms when the British moved into the area in the 1890's. The most powerful kingdom, Buganda, became a British protectorate in 1894, and two years later British authority was extended to cover most of the rest of the region. Great Britain retained control of this territory until 1962, when Uganda became an independent nation within the British Commonwealth. A federal republic was established in 1963, with the king of Buganda as president. In early 1966 the prime minister, Milton Obote, seized the presidency. In 1971 he was deposed in a military coup led by General Idi Amin.

Amin established an extremely repressive dictatorship. Tens of thousands of Ugandans were put to death. In 1972 he deported all residents of East Indian descent. They had owned most of the nation's businesses, and after their departure the country's economy deteriorated.

In 1979 an invasion force of Ugandan exiles and Tanzanians overthrew Amin. Obote returned from exile and in 1980 was elected president by the national legislature. During his rule thousands of Ugandans died at the hands of his security forces and undisciplined troops. In 1985 the army leaders deposed Obote. The military government, in turn, was overthrown in 1986 by rebel forces led by Yoweri Museveni, who became president. In 1996 Museveni was elected president in the country's first direct elections for that office. He was reelected in 2001.

In 2005, Ugandans voted to restore multiparty democracy, which had been suspended in 1986. Museveni was reelected president in 2006.