Slavery in South Africa existed until the abolition of slavery in 1834.
In 1652, Jan van Riebeeck set up refreshment station in what is now Cape Town, and requested slaves. 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 after 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. This increased greatly the next year when the Dutch captured a Portuguese slaver with 500 Angolan slaves, 250 of which were taken to the Cape. Two months later, a further 228 slaves arrived from Guinea.
In 1795 Britain took over the Cape, and in 1807 passed the Slave Trade Act. It was enforced from 1808, ending the external slave trade, and slaves were only permitted to be traded within the colony.
The first large wave of British settlers, the 1820 Settlers were not permitted to own slaves.
In 1833, the Slavery Abolition Act received Royal Assent; this paved the way for the abolition of slavery within the British Empire and its 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.
Some explanations of the Boers' Great Trek (1835 onwards) emphasize Voortrekker discontent with British attitudes to slave-owning and race relations.