Apartheid involved the creation of Homelands for people of specific ethnic groups - creating homogenous Nation States. The idea fed off the post World War I dismantling of Empires, and post World War II dismantling of Colonialism. The idea of self-determination requires defining 'The People' in exclusionary terms. Four of South Africa's Bantustans (Bantu means People, -stan means land in the Persian language) were declared independent, although this was not recognised outside South Africa. Europe was also divided into new Nation States over the last 100 years. This involved population swaps, and standardisation of religion and language. The European Union project is in part an attempt to unwind the consequences.
Homelands at the end of Apartheid in 1994
The long-term plan of creating these Homelands in South Africa was to strip Black South Africans of their South African citizenship. To stop them coming in (to "take control of the borders"). The philosophical connection was made to the separation in 1947 of Pakistan (i.e. -stan) and India, effectively into Muslim and Hindu states. Estimates of the deaths related to the partition of the British Raj are between 250,000 and 1.5 million. In South Africa, it is estimated that 3.5 million people were forcibly resettled to the Bantustans in the 1960s through to the 1980s. The allocation of people to homelands was fairly arbitrary - especially where people had never visited "where they came from" or had parents from different groups. The tying of people to land has been bloody.
British Indian Empire ("British Raj")
South Africa was still reliant on the labour of the Black Population. As in a world where we are now comfortable with the free movement of goods, capital and services. It is the free movement of people that aren't the same as us that seems to cause concern. Eventually, the White South African government capitulated...
"every effort to turn the tide [of black workers] streaming into the urban areas failed. It does not help to bluff ourselves about this. The economy demands the permanent presence of the majority of blacks in urban areas ... They cannot stay in South Africa year after year without political representation."
F.W. de Klerk on 1987 National Party general election campaign