That's tricky. South Africa's running of South West Africa was initially a League of Nations mandate, which the UN technically tried to take over in 1966, though South Africa never respected that mandate and held on to the territory until independence in 1990.
Somewhere before the 1960s, you'd have to physically integrate South West Africa into South Africa. The best bet would be to do so when South Africa becomes a Republic in 1961, the country could come right out and annex the territory as its fifth province. (SA at the time only had four provinces - Cape, Natal, Transvaal and Orange Free State.) While many countries would bitch about it, South Africa would be the 1980s pretty much have integrated the institutions, and it would probably be possible to have the country stay part of SA post-apartheid.