On Wed, May 31, 1961, South Africa gained independence from Britain. This was the first step in the redemption from the Berlin Conference convened. That episode marked the high point of white European competition for territory in Africa, a process commonly known as the Scramble for Africa.
The country became a republic following a referendum (only open to white voters) which narrowly passed; the British-dominated Natal province largely voted against the proposal. Queen Elizabeth II lost the title Queen of South Africa, and the last Governor-General, Charles Robberts Swart, became State President. Black South Africans and their allies had been fighting against apartheid since 1948. As a concession to the Westminster system, the appointment of the president remained an appointment by parliament and was virtually powerless until P. W. Botha's Constitution Act of 1983, which eliminated the office of Prime Minister and instated a near-unique "strong presidency" responsible to parliament. Pressured by other Commonwealth of Nations countries, South Africa withdrew from the organization in 1961 and rejoined it only in 1994.
Despite opposition both within and outside the country, the government legislated for a continuation of apartheid. The security forces cracked down on internal dissent, and violence became widespread, with anti-apartheid organizations such as the African National Congress (ANC), the Azanian People's Organisation (AZAPO), and the Pan-Africanist Congress (PAC) carrying out guerrilla warfare and urban sabotage. The three rival resistance movements also engaged in occasional inter-factional clashes as they jockeyed for domestic influence. Apartheid became increasingly controversial, and several countries began to boycott business with the South African government because of its racial policies. These measures were later extended to international sanctions and the divestment of holdings by foreign investors. In the late 1970s, South Africa initiated a program of nuclear weapons development. In the following decade, it produced six deliverable nuclear weapons.