The visitors turned in a muscular performance, particularly in the second half after the Scots had led 10-8 at the interval.
However, for all the disappointment there was pride for home skipper Stuart Hogg who equalled the Scotland international tries record with a superb brace.
Here’s how the captain, and his Scotland team-mates rated in the penultimate match of the series.
Player ratings scale - 10: One of the best performances you've seen. 9: Outstanding. 8: Very good. 7: Good. 6: Average. 5: Poor, 4: Very poor. 3: A terrible day at the office. 2: Abysmal. 1: One of the worst performances you've seen.
1. Pierre Schoeman - 6
Toughest test yet for the Edinburgh loosehead and he relished the battle but Scotland were distinctly second best in the scrum. 6/10 Photo: Steve Welsh
2. Stuart McInally - 6
Scotland struggled in the set-piece and it was a difficult game for the hooker in what was his first start for Scotland in a year. 6 Photo: Steve Welsh
3. Zander Fagerson - 6
Tough old shift for the prop as South Africa freshened up their front row on the stroke of half-time. Photo: Ross Parker - SNS Group / SRU
4. Grant Gilchirst - 6
Carried well but lineout battle was tough for the Edinburgh man. His clean catch helped set up the move for Hogg’s second try. Photo: Craig Williamson - SNS Group / S