South Africa withstood a second-half fightback to down Scotland 21-10 at Murrayfield to keep the southern hemisphere sides well on top during the November internationals.
Having impressed when scoring three tries in their defeat to the All Blacks last week, Scotland went into their shells in the first 40 minutes against a tactically aware and powerful Springbok side.
They were staring into the barrel of a heavy defeat when South African hooker Adriaan Strauss scored his second try of the match early in the second half, but after reserve halfback Henry Pyrgos finished off a well-worked move from a lineout five minutes later, Scotland spent much of the match camped in the opposition half.
They were unable to breach a resolute Springbok defence however but will buoyed ahead of their final November international against Tonga next Saturday.
The Scots will be desperate to win that match given they have dropped to a world ranking of 10 and the third group of World Cup seeds after Samoa's win over Wales on Friday.
South Africa coach Heyneke Meyer said he was pleased with his side's start, but rued the second-half penalty count.
"We couldn't get into the game," he told the BBC.
"All credit to Scotland - they played superbly, but it was great defence by us to keep them out.
"It was not a great game but we will take an ugly win."
Scotland coach Andy Robinson paid tribute to the Springbok defence.
"South Africa defended superbly well with the physicality they brought to the tackle," he remarked.
"If they had not done that, it could have been a different story.
"You cannot afford to give penalties away like we did in the first half, we gave them field position and territory.
"They scored from a maul which makes me very angry and then from an interception."
South Africa made much of the early running but only had two Pat Lambie penalties to show for their early dominance, while Greig Laidlaw got the Scots on the board with a three-pointer of his own.
The hosts were giving away too many penalties however, and were made to pay on the 20-minute mark when Strauss scored his first test try in his 20th outing, crashing over after an unstoppable rolling maul left the Scottish defence in disarray.
Scotland suffered a second blow when lock Richie Gray was forced to leave the pitch, having been hammered by two Springbok tacklers before the try.
At that stage, Scotland were showing none of the attacking verve they displayed against world champions New Zealand and their only sustained period of pressure in the attacking 22 resulted in a South Africa penalty created by outstanding flanker Francois Louw.
A further Lambie penalty saw his side grab a 14-3 lead at the break.
It got worse for Scotland early in the second half when Strauss scored his second try.
It could not have been more different from his first, with the 26-year-old intercepting a poor pass from halfback Mike Blair and scampering close to 40 metres to score.
That was Blair's last act of the game and his replacement Pyrgos sparked his side with a try straight from the training manual.
Captain Kelly Brown won a lineout and passed on to Pyrgos, who raced through a gaping hole to narrow the deficit.
They began to dominate the forward exchanges, but despite a host of territory and possession, they were unable to find the final pass their efforts deserved.
South Africa lost reserve lock Flip van der Merwe for the final five minutes to a yellow card but the Boks defence refused to be buckled, holding on for a second nervy victory after last week's four-point defeat of Ireland.
What would you rate as a fair price for a mediocre seat at the Rugby World Cup final next year?