In 1971 Idi Amin launched a military coup that overthrew the President of Uganda, Milton Obote, precipitating a deterioration of relations with the neighbouring state of Tanzania. Amin installed himself as President and ruled the country under a repressive dictatorship. In October 1978 Amin launched an invasion of Tanzania. Tanzania halted the assault, mobilised anti-Amin opposition groups, and launched a counter-offensive. In a matter of months, the Tanzania People's Defence Force (TPDF) and its Ugandan rebel allies—unified under the umbrella organisation Uganda National Liberation Front (UNLF)—defeated the Uganda Army in a number of battles, and occupied Kampala, Uganda's capital, on 11 April 1979. With his military disintegrating or already in open revolt, Amin's rule was collapsing. Amin and many of his forces fled to the eastern city of Jinja, which was home to approximately 50,000 people.