The Union of South Africa was formed in 1910 by uniting the Cape Colony, Natal, Transvaal, and Orange Free State. It was a self-governing dominion within the British Empire. Only whites had full political rights.
The union imposed segregation and later apartheid. It left the Commonwealth in 1961 and became a republic. Apartheid ended in 1994 with majority rule.