The Union of South Africa came into being on May 31, 1910 when the old Cape Colony and Natal Colony were combined with the defeated South African Republic and Orange Free State (renamed the Orange River Colony) after the Boer War. The various parts were thereafter known as, respectively, the Cape Province, Natal, Transvaal and the Orange Free State.

Unlike Canada and Australia, the Union was a unitary state, rather than a federation, with the each colony's parliaments being abolished, and replaced with provincial councils. There was a bicameral Parliament, consisting of a House of Assembly and Senate elected mostly by the country's white minority.

Owing to disagreements over where the Union's capital city should be, a compromise was reached in which the seat of government would be Pretoria in the Transvaal, the seat of parliament would be Cape Town in the Cape Province, and the judiciary would be in Bloemfontein, in the Orange Free State. Pietermaritzburg, the capital of Natal, was given compensation. This arrangement continues to this day, with the government ministers, civil servants and diplomats moving from Pretoria to Cape Town every year, when Parliament is in session.

A self-governing Dominion of the British Empire, and later the Commonwealth of Nations, the Union remained under the British Crown, represented in South Africa by a Governor-General. Effective power was exercised by the Prime Minister. Louis Botha, formerly a Boer general, was appointed first Prime Minister of the Union, heading a coalition representing the white Afrikaner and English-speaking communities.

The Union of South Africa became the Republic of South Africa on May 31, 1961 and left Commonwealth in the face of condemnation of its apartheid policies.