South Africa became a country as a result of the South Africa Act of 1909, an act passed by the British Parliament that gave the former colony autonomy. The Statute of Westminster in 1931 made South Africa fully sovereign under the United Kingdom, and the country became independent in 1961.
The indigenous people of South Africa lived in the region for thousands of years before the first Europeans arrived in the 15th century. The Portuguese were the first to round the Cape of Good Hope, but it was the Dutch who first established colonies in the area in 1652. The Dutch were the major colonial power until 1806, when the British drove them out and established control over South Africa. The 19th century was filled with conflict between the British, native Zulus and Dutch Boer immigrants in the region. After a peace treaty in 1902 ended the fighting, the South Africa Act created the Union of South Africa from the disparate colonies, granting many of them home rule.
In 1931, South Africa became a sovereign country, and in 1961 declared itself a republic, independent of the United Kingdom. During this time, the country established an apartheid system that granted power to white South Africans over black South Africans. The struggle for equality lasted for decades, with the first truly democratic elections occurring in 1994.