It ended of their own accord. With the death of President Botha in 1989, the new president, F.W. de Klerk, is going to immediately take an aggressive stance that apartheid needs to end. He legalizes the ANC and the PAC. He immediately releases Nelson Mandela from prison. He starts negotiating with the ANC for an end to apartheid. They set up new elections.