In 1652, Jan van Riebeeck set up a refreshment station for ships bound to the Dutch East Indies in what is now Cape Town and requested slaves. The first slave, Abraham van Batavia arrived in 1653, and shortly afterward, a slaving voyage was undertaken from the Cape to Mauritius and Madagascar. Eventually, van Riebeeck forcibly enslaved Africans for work in the Cape Colony. 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 pastoralKhoikhoi 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, 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.