The downturn, which was the second consecutive quarter of negative growth, was driven by contractions in agriculture, transport, trade and manufacturing industries.
StatsSA said agriculture was hit by a fall in field crops, drought in the Western Cape and severe hailstorms in Mpumalanga province that damaged production.
After a revised 2.6 percent contraction in the first quarter, the latest data piled pressure on Ramaphosa who has promised a “new dawn” after his predecessor Jacob Zuma’s scandal-tainted nine-year reign.
Micheal Power, an asset manager at Investec, said domestic and international events had combined to stall economic growth.
“We are getting no help from the outside with the strengthening dollar, the escalating trade war and issues that are now facing emerging markets,” he told AFP.
“In some respects, this can be seen as a good thing if it means that we are now not drinking to avoid the hangover.”
The recession is the first in South Africa since the 2008–2009 global financial crisis, when South Africa experienced three consecutive quarters of economic decline.
Before Tuesday’s data, Bloomberg said only one of 12 economists surveyed had predicted a contraction.
Independent analyst Daniel Silke said on Twitter that the figures reflected an “inability to create confidence-building measures to enhance work opportunities and uplift investor sentiment.”
Ramaphosa, who faces elections in 2019, has been on an investment drive to attract foreign investment and tackle unemployment of about 28 percent.