The South Africans dominated the first half and held a comfortable 22-6 lead at the break, but the second half forced them to dig deep to secure a well-deserved consecutive win away from home.
It was a match of two halves, no doubt, but for the Springboks, the most important part was the result at the end of each of those halves.
Despite yellow cards to Willie le Roux and Kwagga Smith in the second half and a rash of penalties, the Springboks absorbed the heavy punches dished out by the hosts and when it really mattered, responded with the knock-out blow late in the half when Marx scored his second and South Africa's fifth try.
Argentina started best when wing Emiliano Boffelli kicked the first points of the game with a trademark long range penalty goal, but from the restart, the Springboks took the game by the scruff of the neck.
South Africa gathered the restart and with a lovely, fluent attack through various phases had the Pumas in all sorts of trouble. In fact, they were awarded a penalty right in front of posts and Damian Willemse kicked the goal to equal the scores.
Willemse had another long-range effort 14 minutes in, this time when Argentina blocked some runners from a Le Roux chip, but he pulled it to the left. Boffeli also had a second opportunity soon after, again from 50m, but pushed it to the right.
Twenty minutes in a huge swing in the momentum happened. Canan Moodie got close to the line and when Jaden Hendrikse picked up and went blind, Santiago Carreras tackled the scrumhalf from an offside position. This left referee James Doleman with no option but to award a penalty try to the visitors and give the Puma flyhalf his marching orders to the sin bin.
That pushed the Boks’ lead to 10-3, but Boffelli was soon back in play with a penalty goal after Eben Etzebeth went offside at a ruck and the lead was cut to four.
From the restart, Argentina was trapped deep in their 22 and conceded a penalty under pressure. The Boks went for the attacking lineout and almost scored, with the hosts being penalised twice in close succession for pulling the maul down.
A third Bok lineout drive was stopped again, but when the ball went wide, the blue and white jerseys were in trouble. They scrambled and rushed wide as Marx took it up for the umpteenth time. When the Boks recycled, Hendrikse faked a pass and sniped inside for a second Test try against the Pumas. Willemse converted for a 17-6 lead after 28 minutes.
The Boks were in full control via their pack and they soon forced another penalty. Opting for an attacking lineout with Marx at the back, the visitors scored their third try of the match and took a 22-6 lead after 33 minutes.
The Boks were over again on the halftime whistle, courtesy of Lood de Jager, but upon closer inspection by the TMO, a slight knock-on earlier in the move ruled out the try.
Be that as it may, after 40 minutes of play, the 22-6 lead was well-deserved, but the next 40 minutes delivered a real fightback from the home side who showed renewed energy.
It forced a strong defensive effort from South Africa and they responded well, with Siya Kolisi leading the charge and the breakdown dominance belonged to the Boks, keeping the relentless Pumas attacks at bay.
It was clear that the hosts were feeding off the energy of the home crowd though and kept up their high-tempo attack. They were willing with ball in hand, but determined defence by the Springboks forced them into mistakes and rushed passes.
A yellow card to Le Roux, after some warnings for the rushed defence employed by the Boks, tipped the flow over to the home side. They attacked from all angles at this stage and camped in the SA 22.
Something had to give and it happened swiftly. Smith thought he made a try-saving tackle, but instead was also yellow-carded and Argentina given a penalty try to cut the lead to 22-13.
In a blink Argentina scored again after some good attacking play finding holes in the Bok defence, with Matias Moroni, going over under the sticks, and suddenly the SA lead was cut to two points.
But the Boks came to Buenos Aires with a goal in mind and they did what was needed late in the game.
First Damian de Allende scored try after a strong burst try and Frans Steyn converted to ease the lead back to nine points, and when Marx got his second on the final whistle after delightful play down the blind and a final feed from Makazole Mapimpi, the bonus point was secured in dramatic fashion.
Springboks 36 (22) – Tries: Penalty try, Jaden Hendrikse, Malcolm Marx (2), Damian de Allende. Conversions: Damian Willemse, Frans Steyn (2). Penalty goal: Willemse.
Argentina 20 (6) – Tries: Penalty try, Matias Moroni. Conversion: Emiliano Boffelli. Penalty goals: Boffelli (2).