Ireland could have been sure of a quarter-final place before their final pool match against Scotland had the Springboks failed to beat Tonga, who had lost both previous games.
Andy Farrell’s men, though, can guarantee top spot if they avoid defeat by Scotland, whose own qualification hopes are slim.
Tonga got the first points on the board at the Stade Velodrome through an early penalty from William Havili.
But South Africa were soon in front when scrum-half Cobus Reinach tapped up a quick penalty before sprinting over in the corner.
The Springboks further extended their lead in the 20th minute when the ball bounced off Vincent Koch’s shoulder and straight to Canan Moodie, who darted under the posts.
Makazole Mapimpi went off for a head-injury assessment after being caught by Augustine Pulu as they ducked into a tackle. English referee Luke Pearce and the TMO agreed it was not a yellow-card offense by the Tongan, who was down on his knees at point of contact.
South Africa, edged out 13-8 by Ireland at the Stade de France, scored again through Deon Fourie on the half-hour mark following a driving maul from a lineout before Tonga had a try on the board when captain Ben Tameifuna powered over to reduce the deficit to 21-8 at half-time.
The Springboks secured a bonus-point try early in the second half when replacement Jesse Kriel pushed over and the TMO then ruled against a yellow card to Eben Etzebeth for a collision with Tonga full-back Salesi Piutau.
Tonga responded again as winger Fine Inisi touched down in the corner, only for Willie Le Roux to go over down the left and South Africa replacement Marco van Staden added another try following a well-worked swift counter.
Coventry fly-half Pat Pellegrini produced a memorable moment as he chased down his own kick to score under the posts before Kwagga Smith dived over for South Africa’s seventh try in added time.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies