Apartheid officially ended in 1994 when South Africa held its first democratic elections, allowing citizens of all races to vote. Nelson Mandela, a key figure in the anti-apartheid movement, was elected as the country's first black president.