Scotland waited 50 minutes to find their attacking game against South Africa, but a spell of sustained pressure could not overturn an Adrian Strauss double at Murrayfield.
The Scots could not cope with a first-half physical barrage and Strauss went over after a maul before intercepting Mike Blair's pass early in the second period to help open up an 18-point lead.
Replacement scrum-half Henry Pyrgos soon crossed for the home side and sparked half an hour of relentless pressure, but the home side missed a series of chances.
Scotland forced a series of short-range penalties but failed to take advantage through a mixture of poor decision-making, some desperate defending and crucial decisions by referee George Clancy.
Andy Robinson's side had enough chances to at least equal the three tries they scored in last weekend's 51-22 defeat by New Zealand, but they had been posted missing as an attacking force throughout the first half, although they were not helped by the loss of Richie Gray to a head injury.
Robinson was expecting a direct threat from South Africa and they did not disappoint in the opening moments with several kicks towards Scotland's left side,.
The visitors chose to kick the ball into touch after an offside offence and looked set to drive over from the resulting maul, but referee Clancy pulled them up for obstruction.
The tourists opened the scoring in the seventh minute when Patrick Lambie kicked a penalty after the Scots were penalised for holding on.
Scotland had barely been within 40 metres of the South Africa line but were level on 10 minutes when Greig Laidlaw kicked a long-range penalty, only for Laidlaw himself to be penalised for offside three minutes later and Lambie made no mistake with the penalty.
Gray took a heavy hit as the South Africa forwards quickly closed him down after a kick over the top and the pressure told in the 21st minute when the Springboks instigated a maul after a four-man lineout and once again drove Scotland back with Strauss touching down.
Gray went off with concussion immediately after the try with Al Kellock coming on. There was some respite for Scotland as Lambie missed the conversion.
Springboks flanker Francis Louw then burst through the home defence and won a penalty from Murray with Lambie dispatching a simple kick to make it 14-3.
A penalty near the halfway line on 33 minutes allowed Scotland to put their opponents under serious threat for the first time as they kicked for a lineout six metres from the try line.
Scotland's forwards exerted severe pressure as they looked for an opening but Clancy controversially penalised Kellock for holding on.
Scotland survived the first wave of South Africa attacks after the break but some slack play at both ends of the park in the 46th minute led to them conceding a second try.
Hogg kicked well into the tourists' 22 but was too easily sidestepped by flanker Willem Alberts after chasing the ball.
South Africa quickly worked the ball back into Scotland's half but Blair had possession under little stress and saw his pass intercepted by Strauss. The hooker quickly got the ball under control and ran 40 metres under the posts.
Blair was replaced by Pyrgos as Lambie converted and he got Scotland back into the game in the 51st minute.
Scotland opted to kick for touch from a penalty and Pyrgos ran in unchecked inside of Kelly Brown to collect the instant pass and cross over.
Scotland soon had South Africa on the rack and were moving the ball quickly but Laidlaw inadvertently relieved the pressure by trying to chip over the top.
The visitors could not break away though and Ruan Pienaar had a kick charged down as Scotland stepped up the pace.
Jim Hamilton was over the line at one stage but was pushed back before he could touch down and Nick De Luca almost broke through as South Africa defended on their line.
Scotland forced a penalty and opted for a lineout but Ross Ford was penalised for not throwing straight, in what looked a marginal decision, and Clancy soon decided Scotland had collapsed the scrum.
Brown's interception ensured the Springboks' respite was brief and Scotland forced another chance after a lineout from a penalty, but substitute Ruaridh Jackson attempted to kick over the try line from 10 metres out and Zane Kirchner comfortably averted the danger.
Again there was no let-up and Flip van der Merwe paid the price for the growing number of infringements when he was shown a yellow card in the 77th minute.
Denton almost went over from the resulting set-piece and Scotland worked a chance on the left wing, but Tim Visser could not hold Jackson's close-range pass and the knock-on was called as De Luca crossed in the corner.