Apartheid was a system of legalized racial discriminated that was upheld in South Africa in the second half of the twentieth century. The apartheid gave formal and legal recognition to the idea that whites were superior to the black, colored, and Asian populations of South Africa. Various types of formal and informal discrimination had been in play in South Africa ever since the arrival of Dutch and British colonists. In the 1948 general election, the National Party came to power and began implementing laws to solidify control of the country by the minority white population.
Under apartheid, all people were classified into one of four categories: white, black, colored, or Indian. The last two categories included a number of subcategories. Classification into a category was often quite arbitrary (based, for example, on visual examination of physical features), and individuals who did not readily fit into any one category would be arbitrarily assigned to one (for example, Chinese people were classified as black, while Japanese people were classified as white). Individuals could be promoted or demoted to higher-ranking status at the will of government officials. One's racial classification determined what neighborhood one could live in, what services one could access, and what legal rights one had.
After the National Party came to power, they began passing laws such as the 1949 Prohibition of Mixed Marriages Law, followed by the 1950 Immorality Amendment, which made it illegal for someone belonging to a certain racial classification to have sex with someone from another classification. Between the 1960s and the 1980s, millions of South Africans were displaced from their homes and moved to different regions in order to impose geographic segregation according to race. This segregation, as well as segregated education systems, had important socio-economic consequences that further disenfranchised the non-white population.
Over time, the obvious injustices of the apartheid regime gave rise to both international condemnation and internal resistance. Governments of many countries and bodies like the United Nations condemned apartheid and imposed sanctions on South Africa. The South African population engaged in more resistance, leading to violent clashes with government forces. Beginning in the late 1980s, the National Party began to negotiate with the African National Congress (ANC), the dominant anti-apartheid political group, to end apartheid and move to the democratic system of majority rule. In 1994, fully democratic elections took place, and the ANC was elected to power. They have been elected in every South African election since then.