Racial segregation in South Africa began in colonial times. However, apartheid as an official policy was introduced following the general election of 1948. In the run-up to the 1948 elections, the main Afrikaner nationalist party, the Herenigde Nasionale Party (Reunited National Party) under the leadership of Protestant cleric Daniel Francois Malan, campaigned on its policy of apartheid. The NP narrowly defeated Smuts’ United Party and formed a coalition government with another Afrikaner nationalist party, the Afrikaner Party. Malan became the first apartheid prime minister, and the two parties later merged to form the National Party (NP).
The state passed laws which paved the way for "grand apartheid", which was centered on separating races on a large scale, by compelling people to live in separate places defined by race (This strategy was in part adopted from "left-over" British rule that separated different racial groups after they took control of the Boer republics in the Anglo-Boer war. This created the so called black only "townships" or "locations" where blacks were relocated in their own towns). In addition, "petty apartheid" laws were passed. The principal apartheid laws were as follows:
The first grand apartheid law was the Population Registration Act of 1950, which formalised racial classification and introduced an identity card for all persons over the age of eighteen, specifying their racial group.
The second pillar of grand apartheid was the Group Areas Act of 1950. Until then, most settlements had people of different races living side by side. This Act put an end to diverse areas and determined where one lived