South Africa has a long history of racial conflict dating back to the arrival of Dutch settlers in 1652. The discovery of gold and diamonds in the late 1800s intensified divisions between white and black South Africans. In the early 1900s, the Union of South Africa was established as a self-governing British dominion that restricted political rights along racial lines. The apartheid system of the mid-1900s legally enforced racial segregation and white supremacy. Growing opposition led to democratic elections in 1994, when Nelson Mandela was elected president, marking the end of apartheid and the beginning of majority rule.