Kabaka Mutesa I (r.1856–84) contributed to Uganda's modern development. Sir Apollo Kagwa, chief minister (1890–1926) to Kabaka Mwanga and his successor, Kabaka Daudi Chwa, was one of the dominant figures in Uganda's history. Mukama Kabarega of Bunyoro (r.1896–99) led his people against British and Buganda forces until captured and exiled in 1899; he died in exile in 1923. Apollo Milton Obote (b.1924), founder of the UPC and prime minister from 1962 to 1966, overthrew the first president, Sir Edward Frederick Mutesa (Kabaka Mutesa II of Buganda, 1924–69), and was himself president of Uganda from 1966 to 1971 and from 1980 to 1985. Maj. Gen. Idi Amin Dada (b.1925) overthrew Obote in 1971 and led a military government until he was ousted in 1979 by Tanzanian forces and Ugandan rebels. Yoweri Museveni (b.1944), leader of the National Resistance Movement, became president in 1986 with the help of about 2,000 guerrillas recruited among Tutsi refugee families who had fled Rwanda.