South Africa hooker Malcolm Marx scored a try in the final minute to secure a 36-20 bonus-point victory over Argentina at Estadio Libertadores de America in Buenos Aires on Saturday and keep the Springboks in the Rugby Championship title hunt.
The win lifts the Springboks to 14 points in the table, level with New Zealand. They host Argentina in their final clash in Durban next weekend while the All Blacks are at home to Australia.
The visitors' scores came via a penalty try, one each for scrumhalf Jaden Hendrikse and centre Damian de Allende, and two for Marx.
South Africa dominated the first half with their power-game and led 22-6 at the break, but they were given a scare in the second period, when Argentina roared back in the final 15 minutes and took the score to 22-20 before the Boks pulled away once more.
The home side were also awarded a penalty try to go with a score for centre Matias Moroni.
"To come here is very hard. Argentines are very passionate people and they take pride in their rugby. For us to get a bonus point was special," Bok captain Siya Kolisi said at the post-match presentation.
"Argentina played really well, it was a great battle. It has been tough for us and we had to pull together as a group."
It was a classic example of a game of two halves, and South Africa should really have been further ahead on the scoreboard at the break.
Every time they used their muscular forwards they made yards and forced Argentina into conceding penalties, but when they ran the ball along the backline, they made unforced errors that released the pressure.
The Boks were awarded a penalty try midway through the half when Argentine flyhalf Santiago Carreras failed to get back onside having made a tackle on Canan Moodie and prevented Hendrikse from dotting down in the corner.
The scrumhalf did cross for a score when he spotted a massive gap in the home defence following more incessant pressure, and Marx then got his first from a trademark driving maul as the Boks simply had too much power for their hosts.
Argentina came out for the second half with more fire in their belly and although it took them 25 minutes to put points on the board, they had the Boks scrambling in defence and were for a while the dominant team.
They were awarded a penalty try for an illegal tackle by Kwagga Smith, who received a yellow card and joined Willie le Roux in the sin-bin as the Boks were down to 13 players.
When Moroni crossed to score two minutes later, all the momentum was with Argentina as they moved to within two points.
But in the last 10 minutes the Boks found their composure as well as further scores by De Allende and a second for Marx that earned the bonus point, sealed the win and keeps the pressure on New Zealand in the competition.
"The first half we weren't where we wanted to be in terms of defence and discipline," Argentina captain Julian Montoya said. "In the second half our attitude was much better and we kept going. But it wasn't enough.
"We have to learn from this, you have to play for 80 minutes if you want to win against the world champions."