The economy of South Africa is the second largest in Africa. However, it is the most industrialized, technologically advanced, and diversified economy on the African continent. South Africa is an upper-middle-income economy, one of only eight such countries in Africa. Since 1996, at the end of over twelve years of international sanctions, South Africa's Gross Domestic Product almost tripled to peak at $400 billion in 2011, but has since declined to roughly $283 billion in 2020. In the same period, foreign exchange reserves increased from $3 billion to nearly $50 billion, creating a diversified economy with a growing and sizable middle class, within two decades of ending apartheid.