Robin Peterson's departure in the 25th over opened the floodgates as South Africa lost three quick wickets.