The trophy had already been won by New Zealand earlier on Saturday following a 38-7 victory over Australia in Melbourne, but the Springboks’ success earns them second place and answers more selection questions ahead of the World Cup in France.
"The positive is that the guys kept their cool at the back end and got the win."
The Boks kept Argentina at bay for 75 minutes until the visitors, who dominated possession, scored two late tries.
It was that defensive effort that most pleased Nienaber after the side had been below par in the opening stages of their loss to New Zealand in Auckland a fortnight ago.
"We had a proper defence session," Nienaber said. "I thought our defence was quite poor in the first 17 minutes against New Zealand but there was a massive improvement."
It is unusual for a visiting team to come to Ellis Park and have almost 60% possession, as well as dominate territory, and Nienaber praised Argentina for a game plan well executed.
"They didn’t play with the ball a lot. They kicked it and pinned us in our half. I think we could have got out of our half a little bit better, but they suffocated us there and that led to penalties."
Stand-in captain Duane Vermeulen said after the game it was his final home fixture in a Bok jersey as the number eight is set to retire from international rugby after the World Cup in September and October.
"Whenever you ask him to put his shoulder on the line, his head in a dark place and to go through the gutters, he has never been a guy to shy away," Nienaber said in tribute.
South Africa have named a travelling party for a World Cup warm-up game against Argentina in Buenos Aires next Saturday, with several first-team regulars to stay behind and train with director of rugby Rassie Erasmus.