South Africa, officially the Republic of South Africa (RSA), is the southernmost country in Africa. With over 58 million people, it is the world's 24th-most populous nation and covers an area of 1,221,037 square kilometres (471,445 sq mi). South Africa has three designated capital cities: executive Pretoria, judicial Bloemfontein and legislative Cape Town. The largest city is Johannesburg. About 80% of South Africans are of Bantu ancestry, divided among a variety of ethnic groups speaking different African languages. The remaining population consists of Africa's largest communities of European, Asian, Indian, and multiracial ancestry.
It is bounded to the south by 2,798 kilometres (1,739 mi) of coastline of Southern Africa stretching along the South Atlantic and Indian Oceans; to the north by the neighbouring countries of Namibia, Botswana, and Zimbabwe; and to the east and northeast by Mozambique and Eswatini (former Swaziland); and it surrounds the enclaved country of Lesotho. It is the southernmost country on the mainland of the Old World or the Eastern Hemisphere, and the most populous country located entirely south of the equator.
South Africa is a multiethnic society encompassing a wide variety of cultures, languages, and religions. Its pluralistic makeup is reflected in the constitution's recognition of 11 official languages, the fourth-highest number in the world. Two are of European origin: Afrikaans developed from Dutch and serves as the first language of most coloured and white South Africans; English reflects the legacy of British colonialism, and is commonly used in public and commercial life, though it is fourth-ranked as a spoken first language. The country is one of the few in Africa never to have had a coup d'état, and regular elections have been held for almost a century. However, the vast majority of black South Africans were not enfranchised until 1994.
During the 20th century, the black majority sought to claim more rights from the dominant white minority, which played a large role in the country's recent history and politics. The National Party imposed apartheid in 1948, institutionalising previous racial segregation. After a long and sometimes violent struggle by the African National Congress (ANC) and other anti-apartheid activists both inside and outside the country, the repeal of discriminatory laws began in the mid-1980s. Since 1994, all ethnic and linguistic groups have held political representation in the country's liberal democracy, which comprises a parliamentary republic and nine provinces. South Africa is often referred to as the "rainbow nation" to describe the country's multicultural diversity, especially in the wake of apartheid.
South Africa is a developing country and ranks 113th on the Human Development Index, the seventh-highest in Africa. It has been classified by the World Bank as a newly industrialised country, with the second-largest nominal GDP in Africa, and the 33rd-largest in the world. The country is a middle power in international affairs; it maintains significant regional influence and is a member of the G20. However, crime, poverty and inequality remain widespread, with about a quarter of the population unemployed and living on less than US$1.25 a day.