Human: How many years did apartheid last in South Africa? Assistant: 
Apartheid was a system of racial segregation in South Africa. It lasted from 1948 until 1994. It was a system of legalized racial segregation enforced by the state. It was established in 1948 through the Group Areas Act, which required that people be allocated to different "residential areas" based on their race. It was abolished in 1994, when Nelson Mandela became president of South Africa.