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.

9. Duhan van der Merwe - 7
Always dangerous with ball in hand and played a key role in both of Scotland’s tries. 7 Photo: Steve Welsh

10. Matt Scott - 5
His first Scotland start in four-and-a-half years but it wasn’t a particularly happy return for the Leicester centre. Photo: Craig Williamson - SNS Group / S

11. Chris Harris - 7
Played in Stuart Hogg for Scotland’s opening try and made to work hard defensively but rose to the challenge impressively. 7 Photo: Ross Parker - SNS Group / SRU

12. Rufus McLean - 5
Saw little of the ball and was caught out by Makazole Mapimpi for South Africa’s first try. Made way for Blair Kinghorn early in the second half. Photo: Ross Parker - SNS Group / SRU