Apartheid was a system of racial segregation in South Africa enforced through legislation by the National Party governments, the ruling party from 1948.