First-five Manie Libbok has scored a breakaway try against the run of play to secure South Africa a bruising 22-21 victory over Argentina and earn a second-place finish in the Rugby Championship at Ellis Park.
The Springboks had to withstand heavy Argentine pressure, some of their own making through poor execution, but managed to grind out the win as they also scored tries through lock Eben Etzebeth and centre Damian de Allende.
Argentina were in the contest all the way but battled to break down the resolute home defence and got tries late on through wing Mateo Carreras and replacement Gonzalo Bertranou as the visitors pushed for what would have been a first-ever win in Johannesburg.
New Zealand claimed the Rugby Championship trophy earlier on Saturday with a comprehensive 38-7 victory over Australia in Melbourne but the Boks' victory sees them end second, with Argentina in third.
"It was up and down, there were times we felt we were really dominant with ball in hand, but then there were times we lost it," Bok captain Duane Vermeulen said at the post-match presentation.
"It was (poor) discipline, it just did not work for us, but we walk away with the win and we are thankful for that. There is work to be done before we head to the World Cup."
Under coach Michael Cheika, Argentina have beaten England at Twickenham, New Zealand in Christchurch and Australia in Sydney, but fell just short this time.
South Africa, who had made nine changes going into the game, had the better of the set-piece and dominated the breakdown, but were at times unable to get out of their half against relentless Argentine pressure.
"In terms of heart and passion, this team is never in doubt, how we fight for these colours," Argentina captain Julian Montoya said.
"But today we weren't good enough in some aspects of the game and against a quality team like South Africa, it is too much advantage (to give up).
"The first half we were five or six times in their 22 but we did not take the opportunities. We need to look inside and be better but we are taking steps forward. We will improve."
South Africa lost scrumhalf Grant Williams to a head injury after 31 seconds, among the shortest caps for a starter in test history, but led 15-6 at halftime.
There was no score in the first 28 minutes of the second period but Carreras missed two kickable penalties that would have made all the difference in the end.
Against the run of play, the Boks scored a third try as excellent defence pressured the visitors into coughing up the ball on the home side's 22 and replacement scrumhalf Faf de Klerk sent Libbok away.
Argentina hit back almost immediately as Carreras crossed but a missed conversion meant they trailed by eight points past the hooter at the end of the game.
They did close the gap further though as Bertranou scored under the posts, but must now seek revenge in a World Cup warm-up game against the Boks in Buenos Aires next week.