Slavery in South Africa existed from 1653 in the Dutch Cape Colony until the abolition of slavery in the British Cape Colony on 1 January 1834. This followed the British banning the trade of slaves between colonies in 1807, with their emancipation by 1834. Beyond legal abolition, slavery continued in the Transvaal though a system of inboekstelsel.

Dutch rule
In 1652, Jan van Riebeeck set up a refreshment station for ships bound to the Dutch East Indies in what is now Cape Town. After failing to obtain cattle and local people willing to work by negotiating with them, Van Riebeeck introduced slavery in the Cape Colony. The  first slave, Abraham van Batavia, arrived in 1653 ("van Batavia" meaning "from Batavia", the name of Jakarta during the Dutch colonial period), and shortly afterward, a slaving voyage was undertaken from the Cape to Mauritius and Madagascar.   

In April 1657, there were ten slaves in the settlement, from a population of 144. That increased greatly the next year, when the Dutch captured a Portuguese slaver with 500 Angolan slaves, and 250 were taken to the Cape. Two months later, a further 228 slaves arrived from Guinea. The process was enhanced when settler colonialism commenced when former Dutch East India Company officials were granted land lots. The agricultural settlements of the Boers economically dislocated the pastoral Khoekhoe in Table Bay, who were forced to serve as servants due to their loss of grazing land. The Dutch colonists additionally imported slaves from Portuguese Mozambique, French Madagascar, Dutch Ceylon and Dutch India. Slaves in the Dutch colonies were given poor food, subject to poor living conditions, and punished with whipping for fleeing or disobeying orders.

British rule

Threats to Dutch control of the Cape Colony had emerged in the 18th century, when the Dutch East India Company was weakened during the Fourth Anglo-Dutch War. During the 1780s, troops of the French Royal Army were stationed in the Cape to prevent invasion by Great Britain. The Cape was invaded by the British in 1795 during the War of the First Coalition, and occupied until 1803. 

Britain later formally annexed the Cape and later passed the Slave Trade Act 1807. It was enforced from 1808, ending the external slave trade. Slaves were permitted to be traded only within the colony. At the same time, Parliament passed a series of acts known as the amelioration laws designed to provide better living conditions for slaves. These acts allowed slaves to marry, purchase their own freedom, live with their families, and receive a basic education. The acts also limited punishments and work hours, and encouraged missionaries to convert Africans to Christianity. 

The first large wave of British settlers, the 1820 Settlers, were not permitted to own slaves.

Abolition
In 1833, the Slavery Abolition Act received Royal Assent from King William IV; this paved the way for the abolition of slavery within the British Empire and its colonies. It was reported that there were 38,427 slaves in the Cape of Good Hope in 1833, many fewer than in Jamaica, Barbados or Mauritius, though higher than the reported numbers in other British colonies.

On 1 August 1834, all slaves in the British Empire were emancipated, but they were indentured to their former owners in an apprenticeship system which was abolished in two stages; the first set of apprenticeships came to an end on 1 August 1838, while the final apprenticeships were scheduled to cease on 1 August 1840, six years after the official emancipation.

See also
African slave trade
Cape Malays
Inboekstelsel

References

South Africa
South Africa
Society of South Africa
History of South Africa
1653 establishments in the Dutch Empire
1834 disestablishments
Racism in South Africa
History of the Dutch East India Company
Human rights abuses in South Africa