Uganda gained her independence on October 9th, 1962. She was a British protectorate since 1894. At independence, Dr. Milton Apollo Obote, also the leader of the Uganda People's Congress (UPC) by then became the first Prime Minister and head of the government in Uganda.
UPC came into power through an "unholy" alliance with a pro-monarchy party called the Kabaka Yekka (KY), which had a stated aim of protecting the institution and power of the kingdom of Buganda. One year before independence, UPC lost the first-ever general election to the Democratic Party(DP) and needed the strategic partnership of allies to avoid another defeat.
In November 1963, Kabaka Mutesa II King of Buganda was elected ceremonial President of Uganda thus seemingly sealing the political alliance of UPC and KY. However, this marriage of political convenience was short-lived since both Obote and Mutesa and their following had differing agendas.