Apartheid was a system of racial segregation and discrimination in South Africa between 1948 and 1990. It classified South Africans into racial groups like white, black, and colored, and enforced separation in public spaces, housing, education, employment, and political participation. Nelson Mandela fought against apartheid through peaceful and militant resistance, spending 27 years in prison. He later negotiated an end to apartheid and was elected the first black president of South Africa in 1994. Though apartheid ended, human rights violations still exist in other countries today.