South Africa was ruled by a white minority government for decades, enforcing institutionalised racial segregation, before becoming a multi-racial democracy in 1994.