In 1966 a United Nations resolution terminated South Africa's mandate over the former German colony of South West Africa, also known as Namibia. The white-minority government of South Africa, however, refused to give up its administration and domination of the territory. Black nationalist Africans promptly established a guerrilla liberation front, the South West Africa People's Organization (SWAPO), and began to harass the whites. SWAPO was weak and ineffective at first; however, when the Portuguese were driven out of neighboring Angola, the guerrillas were offered aid and bases there, as well as training by Cuban soldiers. The guerrilla war for independence escalated sharply. South African government troops began raiding guerrilla bases in Angola, while SWAPO forces hit back in Namibia. In 1976, the UN condemned South Africa for "illegal occupation" of the territory, and the following year the UN General Assembly recognized SWAPO as the sole legitimate representative of Namibia. In 1978, the UN called an international conference to resolve the conflict; South Africa's Prime Minister John Vorster (1915-83) agreed to free elections to be supervised by the UN to determine the fate of Namibia; he then reneged. In 1979, Vorster, now president, again rejected a UN proposal to settle the dispute. Two years later a peace conference in Geneva also failed to win concessions from the South African government; control of Walvis Bay, Namibia's only deep-water port, was a major point of contention. The United States supported South Africa's refusal to withdraw from Namibia unless Cuban troops pulled out of Angola; a commission was set up to monitor a cease-fire agreement in 1984. A new, multiracial government was installed in Namibia by South Africa in 1985, but SWAPO's armed struggle continued because of lack of progress toward implementing UN Resolution 435 on independence for Namibiaand the withdrawal of Cuban troops from Angola. In December 1988, a US-mediated peace agreement linked the UN Resolution 435 was signed by South Africa, Cuba, and Angola, setting a timetable for Namibian independence; at the same time Cuba and Angola agreed to a phased withdrawal of Cuban troops from Angola.
The United Nations General Assembly in 1966 voted to revoke South Africa's mandate and to place the territory under direct UN administration. South Africa refused to recognize this UN resolution until 1985, when President Botha ceded administrative control to the territory's interim government. South Africa allowed a UN peacekeeping force and an administrator to implement United Nations Security Council Resolution 435 (1978), establishing the United Nations Transitional Assistance Group (UNTAG) in Namibia. Finally, on December 22, 1988, South Africa signed an agreement linking its withdrawal from the disputed territory to an end to Soviet and Cuban involvement in the long civil war in neighboring Angola.