What factors finally brought an end to apartheid in south America?