The peace was concluded with the Treaty of Vereeniging (May 31, 1902). The two Boer republics became British colonies, but with the promise of future autonomy. On May 31, 1910, the four colonies of Cape, Natal, Orange and Transvaal were united to form a large federation, called the Union of South Africa, with the character of dominion, and with three capitals: one for legislative activity (Città del Capo), one for the executive (Pretoria) and one for the Supreme Court (Bloemfontein). Prime Minister was General Botha, an advocate with Smuts of the Anglo-Boer reconciliation and founder of the African National Party, later South African Party. According to militarynous, South Africa participated in the First World War, occupying the German colonies of East Africa and South West Africa, which in 1919 was assigned to the Union by the League of Nations. The elections of 1924 brought the Nationalist Party led by J. Hertzog to the government which, however, faced with the economic difficulties created by the 1929 crisis, coalesced with Smuts; this resulted in the split of the most intransigent wing of the Nationalist Party, which stood as an autonomous movement (Unified Nationalist Party) led by Reverend D. Malan. In 1931, with the Statute of Westminster, the Union was recognized as an independent state and a member of the Commonwealth. Meanwhile, the Nazi ideologies for which Hertzog, in 1939, tried to declare the neutrality of the country in the face of world conflict were gaining ground (also due to the presence of a strong German colony). The proposal was rejected and Smuts formed the new government (1939-48). South Africa aligned itself with Western powers and its army fought brilliantly above all in Africa (Ethiopia, Libya) and Italy. But the opposition was growing: it advocated clear racial separation (apartheid) and the exclusion of non-whites from political rights, even if whites were in an absolute minority (about 1/4) compared to the Bantu, the mestizos, the coloureds. and to Asians, especially Indians. This doctrine also included the creation of autonomous states for the Bantu (Bantustans).
In 1948, following the electoral victory of the National Front, the leadership of the government passed to Malan, who quickly implemented its principles and methods, and a year later, when the UN took over from the League of Nations, decided to annex the ‘Southwest Africa. In 1954 Malan also retired and his policy was continued by J. Strijdom (1954-58) and on his death by HF Verwoerd (1958-66). Exponent of the Afrikaners party , that is the descendants of the Boers, who now considered themselves a separate people, no less African than the Bantu, Verwoerd further clarified the doctrine of apartheid and it strengthened the relative legislation and, faced with the opposition of the English government to these systems, decided to leave the Union from the Commonwealth (1961). On March 31 of the same year, the Union proclaimed itself independent (850,000 votes in favor against 775,000 against) by constituting itself in South Africa, with a Constitution that excluded non-Europeans from political rights. For some time, however, movements for the attainment of full civil and political rights had begun to form among the Bantu; among these was the African National Congress (ANC; African National Congress), founded on the Indian model in 1913 and chaired by the Nobel Prize Reverend AJ Luthuli. But the most progressive wing left the ANC in 1959, under the leadership of R. Sobukwe. A period of tension and turmoil followed, culminating in the “Sharpeville massacre” (March 21, 1960), after which Bantu associations were banned. In 1966 Verwoerd was killed in Parliament by a deranged man and was succeeded by J. Vorster, who took a more flexible political line, but always rigidly inspired by the criteria of apartheid: he therefore continued in the program of gradual start-up of the Bantustans independence and sought a possibility of coexistence with neighboring African states, at least in terms of commercial relations. The instrumental nature of these “openings” certainly could not stem the growing internal opposition of the black groups, to which the government reacted with heavy repressive measures. A guerrilla movement developed within the ANC, which soon spread to the illegal South African possession of South-West Africa (Namibia). In September 1978 Vorster resigned and was replaced by former Defense Minister PW Botha. The new head of the government, in office until 1989, tried to give a more efficient imprint to the substantial continuity of his policy. While every attempt at internal revolt was severely stifled, the armed forces opposed the actions of the guerrillas with extreme decision, without excluding frequent and bloody attacks against the supposed support bases in neighboring countries. To military initiatives was added the economic blackmail that, thanks to its position of hegemony, the government of Pretoria could exercise over the other nations of southern Africa. The constitutional reform (approved in a referendum in November 1983), which conferred parliamentary representation on the minorities of the colored and the Asians, while confirming the discriminatory formula of the Bantustans for the black population.