South Africa has early human fossils at Sterkfontein and other sites. The first modern inhabitants were the San ("bushman") hunter-gatherers and the Khoi ("Hottentot") peoples, who herded livestock. The San may have been present for thousands of years and left evidence of their presence in thousands of ancient cave paintings ("rock art"). Bantu-speaking clans that were the ancestors of the Nguni (today's amaZulu, amaXhosa, amaSwazi, and vaTsonga peoples) and Tswana-Sotho language groups (today's Batswana and Southern and Northern Basotho) migrated down from east Africa as early as the fifteenth century. These clans encountered European settlers in the late eighteenth and early nineteenth centuries, when the colonists were beginning their migrations up from the Cape. The Cape's European merchants, soldiers, and farmers wiped out, drove off, or enslaved the indigenous Khoi herders and imported slave labor from Madagascar, Indonesia, and India. When the British abolished slavery in 1834, the pattern of white legal dominance was entrenched. In the interior, after nearly annihilating the San and Khoi, Bantu-speaking peoples and European colonists opposed one another in a series of ethnic and racial wars that continued until the democratic transformation of 1994. Conflict among Bantu-speaking chiefdoms was as common and severe as that between Bantus and whites. In resisting colonial expansion, black African rulers founded sizable and powerful kingdoms and nations by incorporating neighboring chieftaincies. The result was the emergence of the Zulu, Xhosa, Pedi, Venda, Swazi, Sotho, Tswana, and Tsonga nations, along with the white Afrikaners.
Modern South Africa emerged from these conflicts. The original Cape Colony was established though conquest of the Khoi by the Dutch in the seventeenth century and of the Xhosa by the British in the eighteenth and nineteenth centuries. Natal, the second colony, emerged from the destruction of the Zulu kingdom by Afrikaners and the British between 1838 and 1879. The two former republics of the Orange Free State and Transvaal (South African Republic) were established by Afrikaner settlers who defeated and dispossessed the Basotho and Batswana. Lesotho would have been forcibly incorporated into the Orange Free State without the extension of British protection in 1869. The ultimate unification of the country resulted from the South African War (1899–1902) between the British and the two Afrikaner republics, which reduced the country to ruin at the beginning of the twentieth century. Even after union, the Afrikaners never forgot their defeat and cruel treatment by the British. This resentment led to the consolidation of Afrikaner nationalism and political dominance by mid century. In 1948, the Afrikaner National Party, running on a platform of racial segregation and suppression of the black majority known as
apartheid ("separateness"), came to power in a whites-only election. Behind the struggles between the British and the Afrikaners for political dominance there loomed the "Native question": how to keep the aspirations of blacks from undermining the dominance of the white minority. Struggles by the black population to achieve democratic political equality began in the early 1950s and succeeded in the early 1990s.
Afrikaners historically considered themselves the only true South Africans and, while granting full citizenship to all residents of European descent, denied that status to people of color until the democratic transition of 1994. British South Africans retain a sense of cultural and social connection to Great Britain without weakening their identity as South Africans. A similar concept of primary local and secondary ancestral identity is prevalent among people of Indian descent. The Bantu-speaking black peoples have long regarded themselves as South African despite the attempts of the white authorities to classify them as less than full citizens or as citizens of ethnic homelands ("Bantustans") between 1959 and 1991. Strong cultural loyalties to African languages and local political structures such as the kingdom and the chieftaincy remain an important component of identity. National identity comes first for all black people, but belonging to an ethnic, linguistic, and regional grouping and even to an ancestral clan has an important secondary status. People once officially and now culturally classified as Coloured regard themselves as South African, as they are a residual social category and their heritage is a blend of all the other cultural backgrounds. Overall, national identity has been forged through a struggle among peoples who have become compatriots. Since 1994, the democratic majority government has avoided imposing a unified national identity from above instead of encouraging social
A strong sense of ethnic separateness or distinctiveness coincides with well-established practical forms of cooperation and common identification. The diversity and fragmentation within ethnic groupings and the balance of tensions between those groups during the twentieth century prevented interethnic civil conflict. While intergroup tensions over resources, entitlements, and political dominance remain, those conflicts are as likely to pit Zulu against Zulu as Zulu against Xhosa or African against Afrikaner.