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. Obote and other Ugandans opposed to Amin fled into neighbouring countries, where they organised militant opposition groups and planned to initiate an insurgency. Their efforts were of little effect until Amin launched an invasion of Tanzania in October 1978. Tanzania blunted the assault, mobilised anti-Amin opposition groups, and launched a counter-offensive.