South African apartheid laws were only partially applied to Namibia but did prevent black Namibians having any political rights and restricted social and economic freedoms. The focus of South African rule was exploitation of the mineral wealth by whites. During the 1960's most of black Africa gained independence and a liberation movement soon appeared in Namibia, SWAPO (South West Africa Peoples Organisation) was founded in 1964 with a mainly Marxist agenda. SWAPO claimed support from all the local tribes but the South Africans in at attempt to divide and conqueror claimed that it was dominated by the Ovambo tribe who make up just over half the population of Namibia. In 1967 South Africa arrested and tried 37 Namibians for supporting terrorism including Herman Toivo ja Toivo one of the founders of SWAPO who was sentenced to 20 years imprisonment.
In 1966 SWAPO established the People's Liberation army of Namibia or PLAN and an armed revolt began. At this time Angola was still a Portuguese colony and this meant that any supply lines to friendly black nations were too long for the Namibia rebels to get enough weapons and aid to wage a serious military campaign so they resorted to gathering support and small acts of terrorism and sabotage. In 1975 Angola became independent and with better supply lines SWAPO was able to move onto a serious guerrilla warfare campaign. With Angolan safe havens SWAPO had around 18,000 men under arms by 1978 and could launch 800 man raids into Namibia. The South Africans responded by attacking the rebel bases across the border including a retaliatory strike into Zambia which forced the Zambians to be more reluctant to support SWAPO. Having learnt from American experiences in Vietnam the South Africans were not going to let the rebels use safe havens in other countries with impunity. South African raids into Angola drove the rebels back 200 miles and did considerable damage. The war escalated and South African and Angolan forces fought their first battle in 1981, 2 Angolan brigades including their Soviet advisors were destroyed. About 10,000 guerrillas were killed for the loss of around 800 South Africans and SWAPO was reduced to terrorist tactics, illustrating how an insurgent force can move between terrorism and guerrilla warfare depending on how successful they are being at the time.
By 1988 the number of SWAPO troops had fallen to a round 8700 of which no more than 800 were near the border, facing them were 12,000 South Africans of the South West African Territorial Force. Interestingly 80% of this force were black although in 1987 one black regiment did refuse to fight but the mutiny was soon put down. Also with these were special forces with a nasty reputation the Koevoet. This was more than enough forces to deal with SWAPO but not enough if Cuban forces in Angola decided to attack. South African counter insurgency tactics were effect and also used the British idea perfected in Malaya of fortified villages which cut off the villagers from any contact with the rebels. Without local support , food and intelligence any insurgency is hard pressed to make any impact, although the fortified villages did create 75,000 refugees who fled to Angola. Until 1988 this was proving an effective but costly ($1.5 million a day) tactic, unfortunately for the South Africans the situation was about to change.
In 1987 the war in Angola escalated after the South African backed Unita after some major successes attacked the main Angolan government base at Cuito Cuanavale. The South Africans sent artillery to help in the siege and the battle developed into an artillery duel between South Africa and Cuba artillery. The Cuban troops got involved directly in the fighting for the first time and rushed reinforcements into the battle. The siege was abandoned in 1988 and the Cubans then sent an extra 10,000 troops to support the communist government in Angola, moving large units to the border with Namibia for the first time during their involvement, the likelihood of a Cuba-South Africa war in Angola suddenly increased. This turned the tide of the war for SWAPO as South African forces were now reluctant to provoke the Cubans by crossing the border to destroy rebel bases. With safe havens near the border now available again SWAPO guerrillas were able to attack South African bases in Namibia and resume their guerrilla warfare operations.
Political pressure was also mounting on the South Africans, in the 1980's the UN helped form a 'contact group' of influential western powers which including the UK and USA to put pressure on South Africa to give Namibia independence. The US negotiator linked independence for Namibia with the issue of Cuban troops leaving Angola, although this was a good move in theory, in practice the Angolan government feared it would survive a Cuban withdrawal and the South Africans had little intention of giving Namibia its independence. The stalemate ended in 1988, as the balance of power in the region started to shift. The Soviets who had been supporting the Angolan government to the tune of $1 billon a year decided that it was time to withdraw its support. Meanwhile South Africa was becoming more isolated internationally and the cots of military intervention was increasing sharply. The South Africans realised that if they got out now they could set some terms for Namibia independence and protect South African business interests. A cease fire was agreed and announced on August 8th 1988 in Geneva. The UN sent a peacekeeping force to monitor the agreement and to help supervise fair elections. Elections were held in 1989 and SWAPO won with 57% of the vote and 41 seats in the assembly, the opposition won 29% and 21 seats, Namibia had its first multi party system.
Namibia finally became independent on 21 March 1990 with guests including the South African president de Klerk and US and Russian foreign ministers. The history of Namibia's struggle for independence presents an excellent case study for those looking at insurgency and counterinsurgency. South Africa showed excellent counterinsurgency tactics adopting both the British tactics of fortified villages to cut off the insurgents oxygen and striking against rebel bases in safe havens instead of trying to police a huge and desolate border. SWAPO on the other hand showed the classic Maoist tactics of being able to shift between full scale guerrilla warfare and small scale terrorism as the situation changed and in the end its persistence proved greater than the South African political will. The conflict in Namibia also illustrates the involvement of super powers in Third World wars to fight the Cold War by proxy and how local powers in this case South Africa strive to protect business interests via war reiterating Clausewitz's saying that war is a continuation of politics by other means.