Nyerere originally planned to halt his forces in Masaka and allow the Ugandan rebels to attack Kampala and overthrow Amin, as he feared that scenes of Tanzanian troops occupying the city would reflect poorly on his country's image abroad. However, Ugandan rebel forces did not have the strength to defeat the incoming Libyan units, so Nyerere decided to use the TPDF to take Kampala. Tanzanian leaders were also inclined to capture the city after Amin's announcement that the inhabitants of Masaka and Mbarara would face retaliation for welcoming the Tanzanian invasion. The successful formation of the UNLF organisation also eased Tanzanian concerns about the aftermath of a seizure of the capital. Kampala was secured by the TPDF on 11 April. Combat operations in the country continued until 3 June, when Tanzanian forces reached the Sudanese border and eliminated the last resistance. The TPDF withdrew from Uganda in 1981.