Until about 1870 the economy of the region was almost entirely based on agriculture. With the discovery of diamonds and gold in the late 19th cent., mining became the foundation for rapid economic development. In the 20th cent. the country's economy was diversified, so that by 1945 manufacturing was the leading contributor to the gross national product (GNP). By 2006, services contributed some 67% of the GNP, while industry contributed over 30% and agriculture only about 2.5%. The economy is still largely controlled by whites, but nonwhites make up more than 75% of the workforce. Working conditions and pay are often poor, and many nonwhites are subsistence farmers.
South Africa has a limited amount of arable land (about 12%) and inadequate irrigation; production is diminished during periodic droughts. The chief crops are corn, wheat, sugarcane, fruits, vegetables, sorghum, potatoes, peanuts, cotton, and tobacco. In addition, large numbers of dairy and beef cattle, sheep, goats (including many Angora goats), and hogs are raised. There is a large fishing industry, and much fish meal is produced. Tourism also contributes significantly to the economy.
The main industrial centers are Johannesburg, Cape Town, Port Elizabeth, Durban, Pretoria, and Germiston. There is food processing and a large wine industry. Principal manufactures include machinery, textiles, iron and steel, chemicals, fertilizer, and forest products. South Africa is a world leader in the production of platinum, gold, chromium, diamonds, aluminosilicates, manganese, and vanadium. Other leading minerals extracted are copper ore, coal, asbestos, iron ore, silver, titanium, and uranium. Automobile assembly, metalworking, and commercial ship repair are also important.
The country has good road and rail networks. The chief seaports are Durban, Cape Town, Port Elizabeth, East London, Saldonha Bay, and Mossel Bay, where natural gas is now extracted offshore. The Orange River Project, a major hydroelectric and irrigation scheme, began in 1963 in central South Africa and was fully operational by the mid-1980s. By 2008, however, the lagging development of electrical power generation capacity led to power shortages within South Africa.
The main imports are machinery and equipment, chemicals, petroleum products, scientific instruments, and foodstuffs. The chief exports are gold, diamonds, platinum, other metals and minerals, equipment, chemicals, and arms. The principal trade partners are Germany, the United States, Japan, and Great Britain. South Africa carries on a large-scale foreign trade and generally maintains a favorable trade balance.