Uganda, which won independence from Britain in 1962, has a long history of dictatorial rule and violence.
For the past three decades it has been under the strong-arm rule of President Yoweri Museveni, who hopes to be re-elected for a fifth term on February 18.
Here is a list of key dates.
Independence
October 9, 1962: Uganda gains independence after being a British protectorate since 1894, with Milton Obote serving as prime minister and Edward Mutesa, king of Buganda, as head of state. A year later, the constitutional monarchy is replaced by a republic, and Mutesa is named ceremonial president.
April 15, 1966: Obote deposes Mutesa and declares himself president, and a year later a constitutional change gives him almost all powers. Socialist-inspired Obote rules with an iron fist.
Terror of Idi Amin
January 25, 1971: General Idi Amin, head of the army, seizes power while Obote is away.
Amin's eight-year reign is particularly brutal, with between 300,000-500,000 people killed. He also expels some 60,000 foreigners, mainly Indians and Pakistanis.
April 11, 1979: Idi Amin is overthrown by troops from neighbouring Tanzania, who have also backed Ugandan rebels, the National Liberation Front. Amin flees into exile.
Obote's comeback
December 15, 1980: After nine years in exile in Tanzania, Obote returns to power, with his Ugandan People's Congress (UPC) party winning elections.
A vicious guerrilla war lasts until 1985, leaving 300,000 people dead. The guerrillas are led by Yoweri Museveni.
Museveni's rebels take power
January 26, 1986: Museveni and his National Resistance Army capture Kampala and he becomes president. The new government soon finds itself fighting new rebel forces.
In 1988, the Lord's Resistance Army (LRA) led by Joseph Kony emerges as a rebel group.
May 9, 1996: Museveni wins the first direct presidential election. He is re-elected in March 2001.
In 2005, a constitutional amendment allows him to run again as often as he likes. Museveni wins two more elections in 2006 and 2011, polls rejected by opposition leader Kizza Besigye.
Cost of military intervention
1998-2003: Uganda joins the regional war in Democratic Republic of Congo. Ugandan soldiers fought with their Rwandan allies and were charged by the International Court of Justice with looting Congo's resources.
2007: Uganda troops form the backbone of the African Union mission to Somalia, battling Al-Qaeda linked Shabaab insurgents. In July 11, 2010, Shabaab suicide bombers kill 76 people in Kampala as they watch the World Cup final in revenge.
December 2013: Uganda sends troops to back neighbouring South Sudan's President Salva Kiir, pulling out in October 2015.
2016: Troops remain in South Sudan fighting LRA rebel remnants in the region, seeking to end their three decade-long campaign across five central African nations.
The LRA is accused of killing more than 100,000 people and kidnapping more than 60,000 children, starting in northern Uganda.