structural:reformatting, linguistic:paraphrasing
Dutch colonisation

By the early 17th century, Portugal's maritime power was starting to decline, and English and Dutch merchants competed to oust Portugal from its lucrative monopoly on the spice trade. Representatives of the British East India Company sporadically called at the cape in search of provisions as early as 1601 but later came to favour Ascension Island and Saint Helena as alternative ports of refuge. Dutch interest was aroused after 1647, when two employees of the Dutch East India Company were shipwrecked at the cape for several months. The sailors were able to survive by obtaining fresh water and meat from the natives. They also sowed vegetables in the fertile soil. Upon their return to Holland, they reported favourably on the cape's potential as a "warehouse and garden" for provisions to stock passing ships for long voyages.

In 1652, a century and a half after the discovery of the cape sea route, Jan van Riebeeck established a victualling station at the Cape of Good Hope, at what would become Cape Town, on behalf of the Dutch East India Company. In time, the cape became home to a large population of vrijlieden, also known as vrijburgers (lit. ' free citizens '), former company employees who stayed in Dutch territories overseas after serving their contracts. Dutch traders also brought thousands of enslaved people to the fledgling colony from Indonesia, Madagascar, and parts of eastern Africa. Some of the earliest mixed race communities in the country were formed between vrijburgers, enslaved people, and indigenous peoples. This led to the development of a new ethnic group, the Cape Coloureds, most of whom adopted the Dutch language and Christian faith.

The eastward expansion of Dutch colonists ushered in a series of wars with the southwesterly migrating Xhosa tribe, known as the Xhosa Wars, as both sides competed for the pastureland near the Great Fish River, which the colonists desired for grazing cattle. Vrijburgers who became independent farmers on the frontier were known as Boers, with some adopting semi-nomadic lifestyles being denoted as trekboers. The Boers formed loose militias, which they termed commandos, and forged alliances with Khoisan peoples to repel Xhosa raids. Both sides launched bloody but inconclusive offensives, and sporadic violence, often accompanied by livestock theft, remained common for several decades.