The Junior Springboks survived conceding three yellow cards to beat New Zealand 25-17 and advance to the semi-finals of the World Rugby Under-20 Championships on Wednesday night.
The points on the pool logs also meant that the Kiwis were knocked out of the tournament, with France, Argentina and Australia going through to the last four.
Argentina will face Australia (6pm SA time) and South Africa will take on France (8.30pm SA time) on Monday in Rosario.
The Junior Boks were dominant from the start of their clash against NZ on Wednesday in what was a must-win game to reach the semi-finals.
Their bigger pack of forwards laid the platform for the victory, as they got stuck in physically and knocked back the New Zealanders in the tackle.
They got off to an excellent start when a powerful surge by tighthead prop Asenathi Ntlabakanye in midfield put them on the front foot.
The ball came out quickly to centre Rikus Pretorius, who ran a wonderful line and offloaded to a flying fullback Vaughen Isaacs to score in the eighth minute.
Scrumhalf Jaden Hendrikse missed the conversion, but slotted a penalty to make it 8-0 after 15 minutes.
Then good fortune favoured the South Africans as a tapped lineout by New Zealand gave SA lock JJ van der Mescht a chance to burst through and claim the ball.
The Sharks youngster showed an incredible turn of pace to go all the way to dot down to set up a 13-0 after 20 minutes.
But yellow cards to flanks Dylan Richardson and Sibusiso Sangweni in the second quarter held the South Africans back, and Fergus Burke got New Zealand on the board with a penalty.
Despite being down to 14 players, South Africa increased their lead to 19-3 at halftime with two further Hendrikse penalties.
It looked like the game was already over at that stage, but a double whammy of a yellow card and penalty try brought the Kiwis back into the game.
With Kaylum Boshier certain to score, he was held back without the ball by SA flyhalf James Mollentze right on the line, and the referee awarded the seven points to make it 19-10 with 35 minutes left.
It's the @JuniorBoks who come out on top in the Pool C decider with their late penalty not only making certain of the win but also denying @AllBlacks U20s a place in the semi-finals alongside them! pic.twitter.com/oSU1evzkVm— World Rugby (@WorldRugby) June 12, 2019
Fortunately for Chean Roux’s team, they managed to absorb the pressure from the opposition in the second half, and replacement goal-kicker Sanele Nohamba landed a relieving penalty with nine minutes to go to stretch the lead to 22-10.
New Zealand reserve wing Lalomilo Lalomilo rounded off in a classy manner with six minutes left, and Burke knocked over the angled conversion to make it a nail-biter at 22-17.
But Nohamba held his nerve to boot over another penalty and secure victory for the South Africans.
The Junior Boks are through to the semi-final of the World Rugby U20 Championship after beating New Zealand 25-17!!!! Yes boys!!!! @Springboks— Junior Springboks (@JuniorBoks) June 12, 2019
South Africa 25 – Tries: Vaughen Isaacs, JJ van der Mescht. Penalties: Jaden Hendrikse (3), Sanele Nohamba (2).
New Zealand 17 – Tries: Penalty Try, Lalomilo Lalomilo. Conversion: Fergus Burke (1). Penalty: Burke (1).@ashfakmohamed