A 1974 coup d'état in Portugal established a military government led by President António de Spínola. The Spínola government agreed to give all of Portugal's colonies independence, and handed power in Angola over to a coalition of the three largest nationalist movements, the MPLA, UNITA, and the FNLA, through the Alvor Agreement. The coalition quickly broke down, however, and the country descended into civil war. The MPLA gained control of the capital Luanda and much of the rest of the country. With the support of the United States, Zaïre and South Africa intervened militarily in favour of the FNLA and UNITA with the intention of taking Luanda before the declaration of independence. In response, Cuba intervened in favor of the MPLA. In the meantime the South Africans and UNITA had come as close as 200 km to the south of the capital, the FNLA and Zairian forces as far as Kifangondo, 30 km to the east.