After joining the Ugandan government, Opira studied at the Institute of Public Administration, office of the Prime Minister of Israel (1963–1964). He was later appointed Assistant Secretary in the office of the Prime Minister of Uganda and received promotions, including one for saving the life of the King Sir Edward Mutesa II from an assassination attempt by Idi Amin in 1966. Opira also served as Organisation of African Unity expert during the Congo crisis. By January 1971 he was the Deputy Chief General Service Officer/Deputy Permanent Cabinet Secretary and Functional Chief Political Advisor in the Office of the President. He fled Uganda and went into exile immediately after the military coup in 1971. He spent the first years of exile in Tanzania, yet was detained for political reasons and imprisoned for 18 months between 1972–1974.