The first humans are believed to have inhabited South Africa more than 100,000 years ago. The historical record of this ethnically diverse country is generally divided into five distinct periods: the pre-colonial era, the colonial era, the post-colonial and apartheid era, and the post-apartheid era. Much of this history, particularly of the colonial and post-colonial eras, is characterised by clashes of culture, violent territorial disputes between European settlers and indigenous people, dispossession and repression, and other racial and political tensions.
The discoveries of diamonds and gold in the nineteenth century had a profound effect on the fortunes of the region, propelling it onto the world stage and introducing a shift away from an exclusively agrarian-based economy towards industrialisation and the development of urban infrastructure. The discoveries also led to new conflicts culminating in open warfare between the Boer settlers and the British Empire, fought essentially for control over the nascent South African mining industry.
Following the defeat of the Boers in the Anglo-Boer or South African War (18991902), the Union of South Africa was created as a dominion of the British Empire in terms of the South Africa Act 1909, which amalgamated the four previously separate British colonies: Cape Colony, Natal Colony, Transvaal Colony and Orange River Colony. The country became a self-governing nation state within the British Empire, in 1934 following enactment of the Status of the Union Act. The dominion came to an end on 31 May 1961 as the consequence of a 1960 referendum, which legitimised the country becoming a sovereign state named Republic of South Africa. A republican constitution was adopted.