It imposed a system of legal racial segregation, a complex of laws known as apartheid