The Union of South Africa was formed in 1910 by uniting four colonies, the Cape, Natal, the Transvaal, and the Orange Free State, into a single self governing dominion within the British Empire. Born of a peace that reconciled Briton and Boer, it did so by shutting everyone else out: only whites enjoyed full political rights, and the Black majority, the vast majority, was written out of citizenship in its own land.
The new state moved fast to entrench racial rule: the Natives Land Act of 1913 confined Black South Africans to a small fraction of the land, passes policed their movement, and the mines and farms ran on their cheap, controlled labor. Black South Africans organized in answer: in 1912 educated Africans founded the South African Native National Congress, later the African National Congress, to fight for a place in the country of their birth.
The young dominion was tested early and hard. South African troops seized German South-West Africa in 1915 and campaigned in German East Africa, while at home the government crushed the Afrikaner rebellion of 1914 and, in 1922, the armed strike of white miners on the Rand, put down with artillery and aircraft. Afrikaner nationalism, humiliated in war, rebuilt itself in politics, and in 1924 J. B. M. Hertzog's National Party won power in alliance with Labour, on a platform of protecting white labor.
By 1924 the Union's pattern was set: a self governing white dominion, grown rich on gold and diamonds, ruling a disenfranchised Black majority whose land and labor built its wealth. The union formed in 1910 endures today as the Republic of South Africa.