South Africa, officially the Republic of South Africa (RSA), is the southernmost country in Africa. Its nine provinces are bounded to the south by 2,798 kilometres (1,739 miles) of coastline that stretches along the South Atlantic and Indian Ocean; to the north by the neighbouring countries of Namibia, Botswana, and Zimbabwe; to the east and northeast by Mozambique and Eswatini; and it encloses Lesotho. Covering an area of 1,221,037 square kilometres (471,445 square miles), the country has a population of over 63 million people (the 6th largest in Africa). Pretoria is the administrative capital, while Cape Town, as the seat of Parliament, is the legislative capital, and Bloemfontein is regarded as the judicial capital. The largest, most populous city is Johannesburg, followed by Cape Town and Durban.
Archaeological findings suggest that various hominid species existed in South Africa about 2.5 million years ago, and modern humans inhabited the region over 100,000 years ago. The first known people were the indigenous Khoisan, and Bantu-speaking peoples who migrated, in waves, from west and central Africa to the region 2,000 to 1,000 years ago. In the north, the Kingdom of Mapungubwe formed in the 13th century. In 1652, the Dutch established the first European settlement at Table Bay, Dutch Cape Colony. Its invasion in 1795 and the Battle of Blaauwberg in 1806 led to British occupation. The Mfecane, a period of significant upheaval, led to the formation of various African kingdoms, including the Zulu Kingdom. The region was further colonised, and the Mineral Revolution saw a shift towards industrialisation and urbanisation. Following the Second Boer War, the Union of South Africa was created in 1910 after the amalgamation of the Cape, Natal, Transvaal, and Orange River colonies, becoming a republic after the 1961 referendum. The multi-racial Cape Qualified Franchise in the Cape was gradually eroded, and the vast majority of Black South Africans were not enfranchised until 1994.