The written history of Cape Colony South Africa (later known as Cape Province) began when Bartolomeu Dias, a Portuguese navigator, discovered the Cape of Good Hope in 1488. In 1497, Vasco da Gama sailed along the whole coast of South Africa on his way to India. The Portuguese, attracted by the riches of Asia, made no permanent settlement at the Cape Colony. However, the Dutch settled the area as a location where vessels could restock water and provisions.
The Dutch settlement in the area began in March 1647, with the shipwreck of the Dutch ship Nieuwe Haarlem. The shipwreck victims built a small fort that they named the "Sand Fort of the Cape of Good Hope." They stayed for nearly one year, until they were rescued by a fleet of 12 ships under the command of W.G. de Jong.
After their return to Holland some of the shipwrecked crewmates tried to persuade the Dutch East India Company to open a trading center at the Cape.
A Dutch expedition of 90 Calvinist settlers, under the command of Jan van Riebeeck, founded the first permanent settlement near the Cape of Good Hope in 1652. Jan van Riebeeck was on one of the rescue ships that had come to rescue the shipwrecked sailors, and upon seeing the land, he decided to return. They arrived in the harbour of modern-day Cape Town on 6 April 1652 with five ships:
The earliest colonists were, for the most part, from the lower, working class and displayed an indifferent attitude towards developing the colony, but after a commissioner that was sent out in 1685 to attract more settlers, a more dedicated group of immigrants began to arrive. French refugees began to arrive in the Cape after leaving their country after the revocation of the Edict of Nantes. This small body of immigrants had a marked influence on the character of the Dutch settlers. Owing to the policy instituted in 1701 of the Dutch East India Company which dictated that schools should teach exclusively in Dutch and strict laws of assembly, the French Huguenots ceased by the middle of the 18th century to maintain a distinct identity, and the knowledge of French disappeared. See also Huguenots in South Africa
The Cape colonists gradually acquired all of the land of the Khoikhoi to the north and east of their base at Cape Town. Large numbers of the Khoikhoi were killed by the colonists. Besides those who died in warfare, whole tribes of Khoikhoi were severely disrupted by smallpox epidemics in 1713 and 1755. A few remaining tribes maintained their independence, but the majority of the Khoikhoi took jobs with the colonists as herdsmen. The Dutch government passed a law in 1787 subjecting the remaining nomadic Khoikhoi to certain restrictions. The direct effect of this law was to make the Khoikhoi even more dependent upon the farmers, or to compel them to migrate northward beyond the colonial border. Those who chose the latter encountered the hostility of their old foes, the Bushmen, who inhabited the plains from the Nieuwveld and Sneeuwberg mountains to the Orange River.
As the European colonists continued to press into Bushmen territory, they came in contact with them. The farmers' cattle and sheep, guarded only by Khoikhoi herdsman, were very tempting for the Bushmen to steal. Reprisals followed, and the situation became so tense that the total extermination of the Bushmen appeared to the government as the only safe way to proceed. War bands, known as "commandos" set out to exterminate the Bushmen. Within a period of six years the commandos allegedly killed or captured upwards of 3,000 Bushmen. Out of the organisation of these commandos, with their field commandants and field-cornets, grew the system of local government in the Dutch-settled districts of South Africa.
The Dutch colonists also imported workmen from India, Indonesia, Madagascar, and Mozambique. From these workmen, the early White settlers, and the Khoikhoi, descend the Cape Coloureds, who presently form the majority of the population in the current Western Cape province.
Neither the hostility of the natives, nor the struggle to make agriculture profitable on Karoo or veld, slowed the progress made by the colonists as much as the narrow and tyrannical policy adopted by the Dutch East India Company. The Company stopped the colony's policy of open immigration, monopolised trade, combined the administrative, legislative and judicial powers into one body, told the farmers what crops to grow, demanded a large percentage of every farmer's harvest, and harassed them. This tended to discourage further development of industry and enterprise. From these roots sprung a dislike of orderly government, and libertarian view-point that has characterised the "boers" or Dutch farmers for many generations. Seeking largely to escape the oppression of the Dutch East India Company, the farmers trekked farther and farther from the seat of government. The Company, in order to control these emigrants, established a magistracy at Swellendam in 1745 and another at Graaff Reinet in 1786. The authorities declared the Gamtoos River as the eastern frontier of the colony, but the trekkers soon crossed it. In order to avoid collision with the Bantu tribes advancing south and west from east central Africa, the Dutch agreed in 1780 to make the Great Fish River the boundary of the colony. In 1795 the heavily taxed boers of the frontier districts, who received no protection against the Africans, expelled the officials of the Dutch East India Company, and established independent governments at Swellendam and at Graaff Reinet.
The Netherlands fell to the French army under the leadership of Napoléon Bonaparte in 1795. Reacting to the weakness of the Dutch holdings, a British army under General Sir James Henry Craig set out for Cape Town in order to secure the colony for the Stadtholder Prince William V of Orange against the French. The governor of Cape Town refused at first to obey any instructions from the prince, but after the British threatened to use force, he capitulated. He did so all the more readily because the Khoikhoi, deserting their former masters, flocked to the British. The boers of Graaff Reinet did not surrender until an army had been sent against them, and in 1799 and again in 1801 they rose in revolt. In February 1803, as a result of the Peace of Amiens, the colony came under the control of the Batavian Republic, which introduced many needed reforms, as had the British during their eight years' rule, as one of General Craig's first acts had been the abolition of torture in the administration of justice.