In 1978, Fred Rwigyema returned to western Uganda and reunited with Kagame. During his absence, Rwigyema had joined the rebel army of Yoweri Museveni. Based in Tanzania, it aimed to overthrow the Ugandan government of Idi Amin. Rwigyema returned to Tanzania and fought in the 1979 war during which Museveni's army, allied with the Tanzanian army and other Ugandan exiles, defeated Amin. After Amin's defeat Kagame and other Rwandan refugees pledged allegiance to Museveni, who had become a cabinet member in the transition government. Kagame received training at the United States Army Command and General Staff College, Fort Leavenworth, Kansas.