The apartheid system in South Africa was dismantled through a series of negotiations and protests that took place in the late 20th century. International pressure, including economic sanctions and boycotts, also played a significant role in ending apartheid. In 1994, democratic elections were held and Nelson Mandela was elected as the first black president of South Africa, marking the official end of apartheid.